About the UML modeling environment in Microsoft Visio

The UML Model Diagram solution in Microsoft Visio provides full support for creating object-oriented models of complex software systems. The solution includes the following tools, shapes, and functionality:

  • The UML Model Explorer, which provides a tree view of your model and a means of navigating from one view to another.
  • Predefined intelligent shapes that represent the elements in the UML notation and support the creation of the UML diagram types. The shapes are programmed to behave in ways that are consistent with the UML semantics.
  • Easy to access UML Properties dialog boxes where you can add names, attributes, operations, and other properties to UML elements.
  • Dynamic semantic error checking that identifies and diagnoses errors, such as missing data or improper use of the UML notation.
  • The ability to reverse engineer projects created in Microsoft Visual C++ 6.0 or Microsoft Visual Basic 6.0 to generate UML static structure models.
  • Generation of code skeletons from class definitions in UML models into C++, Visual C#, or Microsoft Visual Basic.
  • A code checking utility that identifies language-specific errors that can prevent code from compiling in the target language you specify for generating code.
  • Creation of reports for UML static structure, activity, statechart, component, and deployment diagrams.


About UML models

Microsoft Visio supports the creation of UML models without recommending any particular development process. However, to show the UML diagrams in a meaningful context, the following graphic organizes the UML diagram types listed below into models that roughly correspond to phases a development process might follow: use case model phase, domain model phase, design model phase, and implementation model phase.

The phases appear to be consecutive, but the most effective development processes are iterative, with each phase occurring a number of times.

Modeling a system can be broken down into four phases: use case model, domain model, design model, and implemenation model.

Click to show or hide information. Use case model phase

Use cases are narrative descriptions of processes that you create early in a development cycle. They describe the interactions between external actors and your system, and help you understand the system requirements and the terminology used in the domain area. During the use case phase, you create use case diagrams.

Click to show or hide information. Domain model phase

Like the use case model phase, the domain model phase is focused on building an understanding of the domain for which you're developing a system. This is an analysis phase in which you're still thinking about objects and relationships in the real world rather than about programming concepts.

During the domain model phase, you create conceptual static structure diagrams, package diagrams, and sequence diagrams.

Click to show or hide information. Design model phase

During the use case and domain model phases, you focus on understanding the requirements and concepts related to the system you're developing. In the design phase, you apply this understanding and come up with a programming solution.

To develop this solution, you need to use collaboration diagrams to determine how objects will communicate, and class static structure diagrams to define the classes that you will implement in the software.

To understand the life cycle of an object, you can also create a statechart or activity diagram in relation to a particular class or use case.

Click to show or hide information. Implementation model phase

The implementation model phase focuses on the physical and component structure of the development environment. During the implementation phase, you create component diagrams and deployment diagrams.


About system models in the UML solution

When you open the UML Model Diagram solution, you open a modeling environment with the beginnings of a model already in place.

The Model Explorer displays a hierarchical view of your UML model, from the entire system to packages to data types.

The tree view in the UML Model Explorer represents your overall system model. The diagrams you create are views of the model.

  1. Represents the system you are currently modeling. To add a model, on the UML menu, click Models.
  2. Represents one model or abstraction of your system, in this case, a static structure model. To rename any icon in the tree view, click the icon's text once, and then click the text again. Type the new name.
  3. Represents the top package in the static structure model. A package is a container and this package contains all the static structure model elements.
  4. Represents a diagram and corresponds to a drawing page of the same name as the icon. To display the drawing page, double-click the icon.
  5. By default, a new model includes packages that contain the common data types. You can create packages that include your own data types.
  6. Click a plus (+) sign to display package contents. Click a minus (-) sign to hide package contents.

Click to show or hide information. Tip

If you want to work with the UML solution without viewing the system model, hide the UML Model Explorer. To hide or to show the UML Model Explorer, on the UML menu, point to View, and then click Model Explorer.


About Visio UML shapes and UML notation

In Microsoft Visio, you'll find an intelligent SmartShapes symbol for each element in the UML notation. These shapes behave as you would expect the UML element to behave. For example, the Class shape has three compartments for name, attributes, and operations, and the shape expands automatically as you add values.

The UML diagrams you create are views of the models displayed in a tree view format in the Model Explorer.

UML shapes must be properly glued together for the shapes to communicate with the model. When you connect UML shapes, the UML solution helps you connect these shapes correctly by displaying a red outline around connection points or the entire shape.

To get help on any UML shape, right-click the shape, and then click Help on the shortcut menu.


Example of a reverse-engineered solution: FM Stocks

FM Stocks Visual Studio project, reversed engineered in the UML Model Explorer, showing system, model, package and class levels

  1. System icon to represent UML System 1.
    A system is an application or process that can be modeled.
  2. Folder icon to represent the UML Model, Static Model.
    A model is an abstraction of a system.
  3. Folder icon to represent the UML Top Package.
    A package is a grouping of model elements. Packages created by dragging the Package shape to the drawing page also appear in the Model Explorer.
  4. Subsystem icon to represent the UML subsytem, BLL, a project within Visual Studio.
    Subsystems created by dragging the Subsystem shape to the drawing page also appear in the Model Explorer.
  5. Folder icon to represent UML nested package, FM Stocks, a namespace within a project in Visual Studio.
  6. Static structure icon to represent the model diagram, Static Structure1.
    Double-clicking this icon displays the drawing page for the corresponding model diagram.
  7. Icon to represent the Class element, Account.
    Classes created by dragging the Class shape to the drawing page also appear in the Model Explorer.
  8. Icon to represent the attribute, DefaultBalance.
    If you drag an attribute icon to the drawing page, a Class shape that contains this attribute is added to the page.
  9. Icon to represent the operation, Add.
    If you drag an operation icon to the drawing page, a Class shape that contains this operation is added to the page.


About adding UML elements to a model

To understand how to add elements to a UML model, you first need to understand the distinction between a diagram and a model.

Models appear in a hierarchical tree view in the Model Explorer window.

Diagrams are views of a model that are represented by icons in the tree view, and by drawing pages in your UML model diagram drawing file.

Keep the following information in mind when you use the UML solution:

  • You can add elements to a diagram by dragging icons from the tree view or shapes from stencils onto the drawing page.
  • When you drag a shape from a stencil onto the drawing page, the shape becomes part of the model. Many of the shapes you drag onto a drawing page, such as Class shapes, Use Case shapes, and Component shapes, are also automatically added to the tree view as icons.

Note When you drag an icon from the tree view to the drawing page, you are creating a view of the model element (not a new model element).

  • When you add an element to the tree view, that element does not appear in a diagram unless you drag the icon representing the element from the tree view onto a drawing page.
  • You can duplicate elements in the tree view and you can drag element icons into different packages.
  • You can add different views of the same element to different diagrams by dragging the same element icon from the tree view onto different drawing pages.


About deleting UML elements from a model

Icons in the tree view represent elements in the UML model. When you delete an icon from the tree view, you delete an element from the model and all the views of the element in diagrams.

Shapes in UML diagrams represent views of the model elements rather than the elements themselves. By default, when you delete a view of an element, the element is deleted from the diagram but not from the model.

You can change the default behavior so you are prompted when you attempt to delete any view of an element. The message that appears gives you the option to delete only the view or both the view and the model element.

Note For some UML elements, such as a state, only one view can exist in a model. In these cases, deleting a view is the same as deleting the element from the model.


About error checking in the UML model

The Visio UML solution provides two types of error checking, both of which are displayed as messages in the Output window: semantic error checking and code checking. Semantic error checking occurs automatically, noting errors in the design of UML model elements, based on the well-formedness rules in the UML 1.2 specification. Code checking occurs only when activated manually and is one of the steps in the process of generating code in a specific target language.

When code checking is run, code-check warnings are displayed in the Code tab of the Output window, which also notes the number of semantic errors in the model. UML semantic errors are listed on the Errors tab.

Click to show or hide information. The difference between code check warnings and semantic errors

Some of the element settings that are acceptable in the UML may not be valid in the target language specified for code generation. Elements with such settings are flagged with warnings during a code check. Neither semantic errors nor code check warnings will prevent code from being generated in any of the target languages. However, warnings in the Code tab identify generated code that may not compile in the target language.

It is possible to have code warnings that do not produce UML semantic errors, and vice versa. For example, multiple inheritances are permitted in UML diagrams, but not in the C# or Visual Basic languages. On the other hand, you can use interfaces as parameter types in most programming languages, but doing this is not permitted in the UML.

Click to show or hide information. Examples of semantic errors

Errors Tab in the Output Window with a sample error displayed

Semantic errors are written to the Errors tab of the Output window automatically as settings are specified in the UML Properties dialog box.

Example 1 If the class Dept1 has both the IsLeaf and IsAbstract properties checked, the following error appears on the Errors tab:

UMLE00506: Dept1[Class] : A classifier cannot be both leaf and abstract at the same time.

In this example, if the error message is double-clicked, the class element for Dept1 is selected in the tree view, and the Class shape, Dept1, is selected on the drawing page (if a view of that element exists on the page).

Example 2 (not illustrated): If you connect an interface with a class using the Generalization shape, the following semantic error is displayed:

UMLE00034: Generalization1[Generalization] : [Generalization - WFR1] - A generalizable element may only be a subclass of generalizable element of the same kind.

Click to show or hide information. Examples of code check warnings

Code tab in Output window with sample code warnings displayed

There are no messages in the Code tab until you check for coding errors. The first message in the Code tab notes the number of semantic errors and references the Errors tab. In the example above, for the class Dept1, the following messages appear in the Code tab after the code is checked:

There are 1 semantic errors in the model. Select Error in the combo box above to view the semantic errors.

The class 'Dept1' is specified as both abstract and a leaf. An abstract class cannot be instantiated and you cannot derive from a class marked as a leaf.

The attribute 'Dept1::attribute1' is specified as frozen but does not have an initial value assigned. You need to provide an initial value for the generated code to compile.

Code check completed with 3 warning(s).

In this Code tab example, if the message about 'Dept1::attribute1' is double-clicked, the Class shape for Dept1 is selected on the drawing page (if a view of that element is on the page), and the element representing attribute1 is selected in the tree view.


About the Output window

The Output window contains two views: one for UML semantic errors (the Errors tab), and the other for potential code-generation warnings (the Code tab).

Output Window floating and merged with 3 other anchor windows

Errors tab view selected in the Output window

Click to show or hide information. Working with the Output window

  • To move between the Errors taband the Code tab, select one or the other from the list at the top of the Output window.
  • To locate an element containing an error in the tree view or on the drawing page, double-click the message in either the Errors or the Code tab.
  • To change the size of the Output window, drag one of its borders.
  • To show or hide the Output window, from the UML menu, point to View, and then click Output.
  • To copy error text into the clipboard, select text, right-click, and then click Copy.

Click to show or hide information. View semantic errors in the Errors tab

When a UML element has an error because data is missing or the element has been improperly defined based on the well-formedness rule in the UML 1.2 specification, an error message appears in the Errors tab of the Output window.

Click to show or hide information. View code warnings in the Code tab

Language-specific errors, based on your current target language for generating source code, appear in the Code tab of the Output window as warnings These warnings may prevent the generated code from compiling in the target language but won't prevent you from generating code skeletons from the current model.

Click to show or hide information. Copy and paste text from the Output window

To copy the error or warning text from the Output window, select the error message in either the Errors tab or the Code tab, right-click, and then select Copy Error. The message is then copied to the clipboard for use in other applications. You can select a single message to copy, or you can copy all the displayed messages to the clipboard at once by selecting Copy All Errors.

Click to show or hide information. Merge the Output window with other windows

Output Window floating and merged with 3 other anchor windows

Output window as merged with the Model Explorer, Properties, and Documentation windows

You can merge the Output window with other informational windows by dragging windows on top of each other. All anchor windows in Visio can be merged in this way, creating a customized user interface. Anchor windows include the Model Explorer, Properties, Documentation, and Custom Properties windows, among others.

To separate merged windows, select the tab name at the bottom of the window, and drag it to the location you want.

Click to show or hide information. Dock the Output window to one side of the screen

Output window docked to top of drawing page

Output window docked at the top of the drawing page

When you open a new UML drawing file, the Output window opens docked on the bottom of the screen by default. You can dock the Output window to the top, left, or right side of the screen by dragging it to an edge of the drawing page window.


About UML reports

You can create, print, preview, and export reports from a UML diagram to share information with team members at any point during the development process. The UML solution offers preformatted reports for static structure, activity, statechart, component, and deployment diagrams.

You can customize the formatting options and data definitions for each report by using the Title tab and Detail tab in the UML Report dialog box. In addition, you can set typical page formatting options such as page orientation, margin size, and header/footer information for the report using the Page Setup dialog box.

To reuse the contents of a report in another application, you can export the report as a Rich Text Format (RTF) file. You can then open and edit the RTF file in any application that supports RTF, such as Microsoft Word.

Note Formatting options such as font type and size, set in the Header/Footer tab of the Page Setup dialog box, apply only to the selected region of the left and right header and footer text, as viewed in the Preview box in the Page Setup dialog box. Font settings do not affect report titles and subtitles, as set on the Title tab of the UML Report dialog box.


About UML Model diagrams

The Microsoft Visio UML Model Diagram solution provides full support for creating object-oriented models of complex software systems.

Click to show or hide information. Use case diagrams

In the early stages of a development project, use use case diagrams to describe real-world activities and motivations. You can refine the diagrams in later stages to reflect user interface and design details.

Create a use case diagram

Show me an example

Click to show or hide information. Static structure diagrams

Use static structure diagrams to create conceptual diagrams that represent concepts from the real world and the relationships between them, or class diagrams that decompose a software system into its parts.

Create a static structure diagram

Show me an example

Click to show or hide information. Package diagrams

Use package diagrams to group related elements in a system. One package can contain subordinate packages, diagrams, or single elements.

Create a package diagram

Click to show or hide information. Activity diagrams

Use an activity diagram to describe the internal behavior of a method and represent a flow driven by internally generated actions.

Create an activity diagram

Show me an example

Click to show or hide information. Statechart diagrams

Use a statechart diagram to show the sequence of states an object goes through during its life.

Create a statechart diagram

Show me an example

Click to show or hide information. Sequence diagrams

Use a sequence diagram to show the actors or objects participating in an interaction and the events they generate arranged in a time sequence.

Create a sequence diagram

Show me an example

Click to show or hide information. Collaboration diagram

Use a collaboration diagram to show relationships among object roles such as the set of messages exchanged among the objects to achieve an operation or result.

Create a colloboration diagram

Show me an example

Click to show or hide information. Component diagrams

Use a component diagram to partition a system into cohesive components and show the structure of the code itself.

Create a component diagram

Show me an example

Click to show or hide information. Deployment diagrams

Use a deployment diagram to show the structure of the run-time system and communicate how the hardware and software elements that make up an application will be configured and deployed.

Create a deployment diagram

Show me an example


About activity diagrams

Show me an example

An activity diagram is a special case of a statechart diagram in which all of the states are action states and the flow of control is triggered by the completion of actions in the source state.

Related to a specific class or use case, an activity diagram describes the internal behavior of a method. Use an activity diagram to represent a flow driven by internally generated actions. Use a statechart diagram to represent a flow in response to external events.

Activity diagrams encourage you to notice and document parallel and concurrent activities. This makes them excellent tools for modeling workflow, analyzing use cases, and dealing with multi-threaded applications.

Create an activity diagram


Create an activity diagram (UML model)

Show me an example

  1. Open the UML model that contains the UML element for which you want to create an activity diagram.
  2. In the tree view, right-click the icon for the package, subsystem, class, operation, or use case in which you want to create an activity diagram. Point to New, and then click Activity Diagram.

A blank page appears, and the UML Activity stencil becomes the top-most stencil. The workspace displays 'Activity' as a watermark. An icon representing the diagram is added to the tree view.

Note If the tree view is not visible, on the UML menu, point to View, and then click Model Explorer.

  3. If you want to indicate responsibility in the activity diagram, drag a Swimlane shape onto the page for each class, person, or organizational unit you want to represent.

Click to show or hide information. Create swimlanes in an activity diagram

  1. In an activity diagram, drag a Swimlane shape onto the drawing page.
  2. Double-click the shape to add a name and other property values.
  3. Repeat steps 1 and 2 until you've added all the partitions or organizational units you need.
  4. Drag the side selection handles on the Swimlane shapes to make the lanes the size you want.
  5. Drag State, Action State, Object In State and Signal Receipt or Signal Send shapes into the areas defined by the swimlanes and connect them using Control Flow and Object Flow shapes.

  4. Drag an Action State or State shape onto the drawing page for each action or activity state you want to represent. Use the Initial State and Final State shapes to represent initial and final pseudo states.

Work with state shapes

  5. Connect Control Flow shapes to State shapes to indicate the change from one state to another.

Click to show or hide information. Indicate the flow of control in an activity diagram

  1. In an activity diagram, drag a Control Flow shape onto the drawing page.
  2. Glue the Control Flow shape endpoint (without the arrowhead) to a connection point [image] on the source Action State or State shape.
  3. Glue the Control Flow shape endpoint (with an arrowhead) to a connection point on the destination Action State or State shape.
  4. Double-click the Control Flow shape to add a transition string, including an event, guard condition, action expression, and more.

  6. Use the complex transition shapes, Transition (Fork) or Transition (Join), to represent the forking of one action state into multiple parallel states, or the synchronization of multiple action states into one state.

Work with transition shapes

  7. If you want to replace transition strings with signal icons, use the Signal Send and Signal Receipt shapes to represent the signals.
  8. Double-click any shape to open its UML Properties dialog box where you can add a name, transition string, guard condition, deferred events, and other properties.
  9. Save the diagram.


About collaboration diagrams

Show me an example

A collaboration diagram represents a collaboration, which is a set of object roles related in a particular context, and an interaction, which is the set of messages exchanged among the objects to achieve an operation or result. It is an interaction diagram that shows, for one system event defined by one use case, how a group of objects collaborate with one another.

Unlike a sequence diagram, a collaboration diagram shows relationships among object roles and it does not express time as a separate dimension. Therefore, the messages in a collaboration diagram are numbered to indicate their sequence.

Create a colloboration diagram


Create a collaboration diagram (UML model)

Show me an example

  1. On the File menu, point to New, point to Software, and then click UML Model Diagram.
  2. In the tree view, right-click the package in which you want to include the collaboration diagram, point to New, and then click Collaboration Diagram.

A blank page appears, and the UML Collaboration stencil becomes the top-most stencil. The workspace displays 'Collaboration' as a watermark. An icon representing the diagram is added to the tree view in the Model Explorer.

Note If the tree view is not visible, on the UML menu, point to View, and then click Model Explorer.

  3. For each object role you want to represent in the collaboration, drag a Classifier Role shape onto the drawing page.

Work with Classifier Role shapes

Click to show or hide information. Designate an object as new, destroyed, or transient in a collaboration diagram

  1. In a collaboration diagram, right-click the Classifier Role shape for the object you want to designate as new, destroyed, or transient, and then click Shape Display Options.
  2. Under Classifier role state, click the condition you want.

Note To apply this change only to the selected shape, in the Shape Display Options dialog box clear the option Apply to the same selected UML shapes in the current drawing window page. If you want all subsequent classifier roles shapes you drop on the diagram to have the same condition, select the Apply to subsequently dropped UML shapes of the same type in the current drawing window page check box.

The condition appears in brackets after the object name (for example, Object1{transient}).

Click to show or hide information. Designate an object as active in a collaboration diagram

In a collaboration diagram, a Classifier Role shape designated as active will include {active} after the object name. A classifier role is active when the class it is based on is active.

To indicate that a class is active, double-click the shape or tree view icon that represents the class. In its UML Class Properties dialog box, click Class, check IsActive, and then click OK. The classifier role becomes active as a result of the class being active.

  4. For each set of objects you want to represent, drag a Multi-Object shape onto the drawing page.

Work with Multi-Object shapes

  5. Double-click each Classifier Role or Multi-Object shape to open the UML Classifier Role Properties dialog box where you can add a name and other property values.
  6. Indicate links between the objects by connecting them using Association Role shapes.

Work with Association Role shapes

Click to show or hide information. Create an association role path in a collaboration diagram

  1. In a collaboration diagram, drag an Association Role shape near the two Classifier Role or Multi-Object shapes you want to create a path between.
  2. Glue the endpoints of the Association Role shape to connection points [image] on the two shapes you want to connect with a path.

Click to show or hide information. Tip

To indicate an association role path from a classifier role to itself, glue the two endpoints of a U-shaped Association Role shape to two connection points on the same classifier role.

  7. Double-click each Association Role shape to open the UML Association Role Properties dialog box, where you can add a name, a message flow, a message label, multiplicity, and other property values.

Click to show or hide information. Add a message to an association role in a collaboration diagram

  1. In a collaboration diagram, double-click the Association Role shape to which you want to add a message.
  2. Type a name for the association role, and then click Messages.
  3. Click New. Type a name and sequence expression. Choose the stereotype, direction, and flow kind you want.
  4. For a flat message or procedure call, click Properties. Select the operation you want the message to generate. If the operation doesn't exist, click New to create it.

For an asynchronous message, choose the signal you want the message to generate. If no reception for the signal exists on the classifier that the object lifeline receiving the message is based on, click New to create the reception.

  8. Save the diagram.


About component diagrams

Show me an example

Component diagrams are implementation-level diagrams that show the structure of the code itself. A component diagram consists of components, such as source code files, binary code files, executable files, or dynamic-link libraries (DLLs), connected by dependencies.

Use a component diagram to partition a system into cohesive components. Typically, each component in a component diagram is documented in more detail in a use case or class diagram.

Create a component diagram


Create a component diagram (UML model)

Show me an example

  1. On the File menu, point to New, point to Software, and then click UML Model Diagram.
  2. In the tree view, right-click the package or subsystem in which you want to include the component diagram, and then on the New menu, click Component Diagram.

A blank page appears, and the UML Component stencil becomes the top-most stencil. The workspace displays 'Component' as a watermark. An icon representing the diagram is added to the tree view.

Note If the tree view isn't visible, point to View on the UML menu, and then click Model Explorer.

  3. Drag a Component shape onto the drawing page for each component you want to represent.
  4. Where appropriate, drag an Interface shape onto the drawing page and glue the endpoint without the circle to a component shape.

Click to show or hide information. Add an interface to a class, component, or other elements

  1. In a static structure, component, or deployment diagram, drag the lollipop Interface shape (represented by a line and circle) onto the drawing page.
  2. Glue the endpoint without the circle to a connection point [image] on the class, component, or other element.
  3. Double-click the Interface shape to add a name, operations, and other property values.

Click to show or hide information. Tip

You can also represent an interface with a rectangular Interface shape that resembles a class. Use this shape when you want to display a list of the interface operations.

To change the type of shape that displays for an interface, right-click the Interface shape and click Show as Class-like Interface or Show as Lollipop Interface.

  5. Use Dependency shapes to indicate the relationships between components or between one component and another component's interface.

Click to show or hide information. Indicate a dependency relationship between UML elements

  1. Drag a Dependency shape from the UML Static Structure, UML Deployment, or UML Component stencil onto the drawing page and place it near the elements you want to relate.
  2. Glue the endpoint with an arrowhead to a connection point [image] on the element the other element depends on. Glue the endpoint without an arrowhead to a connection point on the element that depends on the other element.
  3. Double-click the dependency to add a name, stereotype, and other properties.

Click to show or hide information. Tip

If you want to indicate a trace, refinement, usage, or binding dependency, you can use the Trace, Refinement, Usage, or Binding shapes from the UML Static Structure stencil.

  6. Double-click any shape to open its UML Properties dialog box where you can add a name, attributes, operations, and other properties.
  7. Save the diagram.


About deployment diagrams

Show me an example

Deployment diagrams are implementation-level diagrams that show the structure of the run-time system. From a deployment diagram, you can understand how the hardware and software elements that make up an application will be configured and deployed.

Deployment diagrams consist of nodes, components, and the relationships between them.

Create a deployment diagram


Create a deployment diagram (UML model)

Show me an example

  1. On the File menu, point to New, point to Software, and then click UML Model Diagram.
  2. In the tree view, right-click a package or subsystem in which you want to include the deployment diagram, point to New, and then click Deployment Diagram.

A blank page appears, and the UML Deployment stencil becomes the top-most stencil. The workspace displays 'Deployment' as a watermark. An icon representing the diagram is added to the tree view.

Note If the tree view isn't visible, point to View on the UML menu, and then click Model Explorer.

  3. Drag a Node shape onto the drawing page. Drag Component and Object shapes into the node. Drag a selection handle on the node to resize it.

Click to show or hide information. Contain elements within a node in a deployment diagram

  1. In a deployment diagram, drag a Node or Node Instance shape from the UML Deployment stencil onto the drawing page.
  2. Double-click the node to add a name, attributes, operations and other property values.
  3. Drag a corner selection handle to resize the node so it can accommodate the elements you want it to contain.
  4. Drag Component, Component Instance, and Object shapes on top of the Node shape, and then connect the shapes with dependency relationships where appropriate.
  5. Do one of the following:
  • Double-click each node. In the UML Node Properties dialog box, click Components. Under Choose the components which are deployed by this node, select the appropriate components, and then click OK.
  • Double-click each component. In the UML Component Properties dialog box, click Nodes. Under Choose the nodes which deploy this component, select the appropriate nodes, and then click OK.

Important Do not group a node and the shapes it contains. If you need to move a node and the elements within it, drag a selection rectangle around the node to select all the shapes, and then drag them to the position you want.

  4. Repeat step 3 until you have all the nodes you need.
  5. Where appropriate, drag an Interface shape onto the drawing page and glue the endpoint without the circle to a component shape.

Click to show or hide information. Add an interface to a class, component, or other element

  1. In a static structure, component, or deployment diagram, drag the lollipop Interface shape (represented by a line and circle) onto the drawing page.
  2. Glue the endpoint without the circle to a connection point [image] on the class, component, or other element.
  3. Double-click the Interface shape to add a name, operations, and other property values.

Click to show or hide information. Tip

You can also represent an interface with a rectangular Interface shape that resembles a class. Use this shape when you want to display a list of the interface operations.

To change the type of shape that displays for an interface, right-click the Interface shape and click Show as Class-like Interface or Show as Lollipop Interface.

  6. Use Communicates shapes to indicate the relationships between nodes.

Click to show or hide information. Indicate a communication association between nodes in a deployment diagram

  1. In a deployment diagram, drag a Communicates shape from the UML Deployment stencil onto the drawing page.
  2. Glue one endpoint of the Communicates shape to a connection point [image] on the first node.
  3. Glue the other endpoint of the Communicates shape to a connection point on the second node.
  4. Double-click the Communicates shape to add a name and other property values to the element and to its ends.

  7. Use Dependency shapes to indicate the relationships between components and objects, and between components and other components' interfaces.

Click to show or hide information. Indicate a dependency relationship between UML elements

  1. Drag a Dependency shape from the UML Static Structure, UML Deployment, or UML Component stencil onto the drawing page and place it near the elements you want to relate.
  2. Glue the endpoint with an arrowhead to a connection point [image] on the element the other element depends on. Glue the endpoint without an arrowhead to a connection point on the element that depends on the other element.
  3. Double-click the dependency to add a name, stereotype, and other properties.

Click to show or hide information. Tip

If you want to indicate a trace, refinement, usage, or binding dependency, you can use the Trace, Refinement, Usage, or Binding shapes from the UML Static Structure stencil.

  8. Double-click any shape to open its UML Properties dialog box where you can add a name, attributes, operations, and other properties.
  9. Save the diagram.


About package diagrams

As your understanding of the problem domain increases, your conceptual model becomes more complicated and can reach an unmanageable size. You can use packages to divide your model into smaller, more manageable subsets.

A package is the basic organizing element of a UML system model. You can think of the entire system as a package that contains all the other packages, diagrams, and elements. One package can contain subordinate packages, diagrams, or single elements, and you can set the visibility of a package as well as the visibility of the elements it contains.

You can use packages throughout a development process to group related elements. For example, if a conceptual diagram becomes too large, you can partition its elements using packages. Or, you can use packages to define system architecture.

Create a package diagram


Create a package diagram (UML model)

  1. On the File menu, point to New, point to Software, and then click UML Model Diagram.
  2. In the tree view, right-click the package you want to use as a container for other packages, point to New, and then click Static Structure Diagram.

A blank page appears, and the UML Static Structure stencil becomes the top-most stencil. The workspace displays 'Static Structure' as a watermark. An icon representing the diagram is added to the tree view.

Note If the tree view is not visible, point to View on the UML menu, and then click Model Explorer.

  3. In the tree view, click the name of the static structure diagram icon, and then click the name again. Type a new name for the diagram.
  4. Drag a Package shape from the UML Static Structure stencil onto the package diagram drawing page to indicate one of the packages the top package contains. A package is automatically added to the tree view.
  5. Double-click the new package shape to open the UML Package Properties dialog box. Type a name for the package, such as SubPackage1, type and choose other property values, and then click OK.
  6. Right-click the SubPackage1 icon in the tree view, point to New, and then choose the type of diagram you want to represent in the subpackage.
  7. In the tree view, click the name of the static structure diagram icon, and then click the name again. Type a new name for the diagram, such as SubPackage1 Diagram.

An icon representing the diagram is added to the tree view and the appropriate stencil and a blank drawing page appear.

  8. Drag shapes onto the drawing page to represent the elements the subpackage contains.
  9. In the tree view, double-click the diagram icon for Package Diagram, and then repeat steps 3 through 7 until you have created all the subpackages you want.


About sequence diagrams

Show me an example

A type of interaction diagram, a sequence diagram shows the actors or objects participating in an interaction and the events they generate arranged in a time sequence. Often, a sequence diagram shows the events that result from a particular instance of a use case but a sequence diagram can also exist in a more generic form.

The vertical dimension in a sequence diagram represents time, with time proceeding down the page. The horizontal dimension represents different actors or objects.

Create a sequence diagram


Create a sequence diagram (UML model)

Show me an example

  1. On the File menu, point to New, point to Software, and then click UML Model Diagram.
  2. In the tree view, right-click the package or subsystem in which you want to include the sequence diagram, then point to New, and then click Sequence Diagram.

A blank page appears, and the UML Sequence stencil becomes the top-most stencil. The workspace displays 'Sequence' as a watermark. An icon representing the diagram is added to the tree view.

Note If the tree view is not visible, on the UML menu, point to View, and then click Model Explorer.

  3. For each object involved in the interaction the sequence diagram represents, drag an Object Lifeline shape onto the drawing page. Adjust the lengths of the lifelines to correspond to the lengths of the objects' lives in the interaction, and add destruction markers to lifelines for objects that are destroyed.

Work with Object Lifeline shapes

Click to show or hide information. Indicate that an object in a sequence diagram is destroyed

  1. In a sequence diagram drag an Object Lifeline shape onto the drawing page to represent an object that is destroyed during the interaction the sequence diagram represents.
  2. Right-click the Object Lifeline shape, click Shape Display Options, and then select Destruction marker.

Note To apply this change only to the selected shape, clear the option Apply to the same selected UML shapes in the current drawing window page in the UML Shape Display Options dialog box.

A black X appears at the end of the object's lifeline.

  4. Double-click an Object Lifeline shape. In the UML Classifier Role Properties dialog box, click ClassifierRole. Do one of the following:
  • Under Classifier, choose the classifier the object represents, and then click OK.
  • Click New to create a new classifier in the system.

The appearance of the object icon may change to reflect the classifier you chose.

  5. To indicate when an object is performing an action, drag an Activation shape onto the object's lifeline. Glue the endpoints of the Activation shape to connection points on the Object Lifeline shape. Adjust the length of the activation rectangle to correspond to the object's period of activity.

Work with Activation shapes

Click to show or hide information. Indicate transition times on a sequence diagram

  1. In the tree view, double-click click the icon representing the sequence diagram to which you want to add transition times.

The drawing page with the sequence diagram appears.

  2. On the toolbar, select the Text tool [image].
  3. On the drawing page, click where you want to add the name of the message instance, which represents the time the message is sent, and then type the name.

Usually, the name appears in the left margin of the diagram aligned with the message to which it applies. The name can be a simple letter, such as a or b.

  4. On the toolbar, select the Pointer tool [image].
  5. Drag a Constraint shape onto the drawing page near the message name. Double-click the shape, and under Body, type any constraint information relevant to the message time (for example, b - a < 1 sec). Click OK.

Click to show or hide information. Tip

If the delivery of a message is not instantaneous, slant the message line and name the time the message is received with the same letter as the time the message is sent, but add a prime (for example, a for the time sent and a‘ for the time received).

A sequence diagram with named times for when messages are sent and received.

Click to show or hide information. Show conditionality on a sequence diagram object

  1. In a sequence diagram, drag a Lifeline shape onto the drawing page near the object lifeline on which you want to show conditionality.
  2. Glue the endpoints of the Lifeline shape to connection points [image] on the Object Lifeline shape. To extend the conditional lifeline, drag a control handle [image] on the Lifeline shape.
  3. Double-click the Lifeline shape to open its UML Properties dialog box where you can add a name and other property values to the lifeline.

Click to show or hide information. Tip

You can also glue the endpoints of a Lifeline shape to connection points on an Activation shape associated with an object lifeline.

  6. Use Message shapes to indicate communication between the objects.

Work with Message shapes

Click to show or hide information. Indicate a message between objects on a sequence diagram

  1. In a sequence diagram, drag a Message shape onto the drawing page.

The message shape you choose depends upon the kind of message you want to send (regular, asynchronous, procedure call, or return).

  2. Glue the message endpoint (without the arrowhead) to a connection point [image] on the lifeline of the object sending the message.
  3. Glue the message endpoint (with the arrowhead) to a connection point on the lifeline of the object receiving the message.
  4. Double-click the message, and then type or choose the message name, stereotype, sequence expression, and flow kind.
  5. For a flat message or procedure call, choose the operation you want the message to generate. If the operation doesn't exist, click New to create it.

For an asynchronous message, choose the signal you want the message to generate. If no reception for the signal exists on the classifier that the object lifeline receiving the message is based on, click New to create the reception.

Click to show or hide information. Tip

To indicate a message from an object to itself, glue the two endpoints on an arc-shaped Message shape to two connection points on the same object lifeline.

  7. Double-click any shape to open its UML Properties dialog box, where you can add a name and other property values.
  8. Save the diagram.


About statechart diagrams

Show me an example

A state machine, which is attached to a class or use case, is a graph of states and transitions that describes the response of an object to outside stimuli.

A statechart diagram represents a state machine. By documenting events and transitions, a statechart diagram shows the sequence of states an object goes through during its life.

To represent a flow driven by internally generated actions rather than external events, use an activity diagram.

Create a statechart diagram


Create a statechart diagram (UML model)

Show me an example

  1. Open the UML model that contains the class or use case that includes behavior you want to represent in a statechart diagram.
  1. On the File menu, point to New, point to Software, and then click UML Model Diagram.
  2. In the tree view, right-click the icon representing the class or use case that includes behavior you want to represent in a statechart diagram. Point to New and click Statechart Diagram.

A blank page appears, and the UML Statechart stencil becomes the top-most stencil. The workspace displays 'Statechart' as a watermark. An icon representing the diagram is added to the tree view.

Note If the tree view is not visible, on the UML menu, point to View, and then click Model Explorer.

  3. Drag State shapes onto the drawing page to represent the sequence of states an object goes through.

Work with state shapes

  4. Drag a Composite State shape onto the page to represent concurrent, mutually exclusive, or nested substates.

Work with composite state shapes

  5. Connect states to other states using Transition shapes to indicate that an object in one state will enter the second state in response to an event.

Work with transition shapes

Click to show or hide information. Tip

Use the arc-shaped Transition shape to indicate that an object stays in the same state in response to an event. Connect both ends of the transition to connection points [image] on the same state shape.

  6. Connect Transition shapes to Transition (Join) and Transition (Fork) shapes to represent the forking of one state into multiple states or the synchronization of multiple states into one state.
  7. Use Shallow History or Deep History shapes to indicate that an object resumes a state it last held within a region.

Work with composite state shapes

  8. Double-click any shape to open its UML Properties dialog box and add a name, actions, activities, events, and other properties.
  9. Save the diagram.


About static structure diagrams

Show me an example

Click to show or hide information. Conceptual static structure diagrams

A conceptual diagram is a static structure diagram that represents concepts from the real world and the relationships between them. It focuses on relationships and attributes rather than methods, and helps you understand the terminology in the domain area for which you are developing a system.

Click to show or hide information. Class static structure diagrams

Like conceptual diagrams, class diagrams are static structure diagrams that decompose a software system into its parts. In a class diagram, however, the parts are classes that represent fully defined software entities rather than objects that represent real-world concepts.

In addition to attributes and associations, a class diagram also specifies operations, methods, interfaces, and dependencies.

Create a static structure diagram


Create a static structure diagram (UML model)

Show me an example

  1. On the File menu, point to New, point to Software, and then click UML Model Diagram.
  2. In the tree view, right-click the package in which you want to include the static structure diagram, point to New, and click Static Structure Diagram.

A blank page appears, and the UML Static Structure stencil becomes the top-most stencil. The workspace displays 'Static Structure' as a watermark. An icon representing the diagram is added to the tree view.

Note If the tree view isn't visible, point to View on the UML menu, and then click Model Explorer.

  3. Drag class or object shapes onto the drawing page to represent the classes or objects you want to include in your class static structure diagram or conceptual model.

Work with Class and Object shapes

  4. Double-click each shape to open its UML Properties dialog box, where you can add attributes, operations, and other properties.
  5. Right-click each class or object shape, and then click Shape Display Options to select which properties to display on the shape and which compartments of the shape to suppress (such as attributes, operations, and template parameters).
  6. Indicate relationships between the classes and objects using Association, Link, Dependency, Generalization, or Composition shapes.

Work with Assocation shapes

Work with Dependency shapes

Work with Generalization and Composition shapes

Work with Link shapes

  7. Double-click each relationship shape (Association, Link, Dependency, Generalization, or Composition) to open its UML Properties dialog box, where you can add association end adornments and other properties.

Note For details about how a static structure diagram fits into a UML model, see UML models.


About use case diagrams

Show me an example

After you identify the use cases, you can create use case diagrams to put the use cases in context. Creating a use case diagram involves establishing a system boundary for a set of use cases and defining the lines of communication between a particular actor and a use case.

In the early stages of a development project, use case diagrams describe real-world activities and motivations. You can refine the diagrams in later stages to reflect user interface and design details.

Create a use case diagram


Create a use case diagram (UML model)

Show me an example

  1. On the File menu, point to New, point to Software, and then click UML Model Diagram.
  2. In the tree view, right-click the package or subsystem in which you want to include a use case diagram, then point to New, and then click Use Case Diagram.

A blank page appears, and the UML Use Case stencil becomes the top-most stencil. The workspace displays 'Use Case' as a watermark. An icon representing the diagram is added to the tree view.

Note If the tree view is not visible, on the UML menu, point to View, and then click Model Explorer.

  3. Drag the System Boundary shape onto the drawing page.

Work with System Boundary shapes

Click to show or hide information. Indicate a system boundary in a use case diagram

  1. In a use case diagram, drag a System Boundary shape onto the drawing page.
  2. Double-click the shape, and then type a new name for the system or press the DELETE key to delete the existing name. Click outside the shape on the drawing page.
  3. To resize the system boundary, select the shape, and then drag a selection handle.

  4. Drag Use Case shapes from the Use Case stencil and place them inside the system boundary, and then drag Actor shapes to the outside of the system boundary.

Work with Use Case shapes

Work with Actor shapes

  5. Use Communicates shapes to indicate relationships between use cases and actors.

Work with Communicates shapes

Click to show or hide information. Indicate a relationship between an actor and a use case

  1. In a use case diagram, drag a Communicates shape onto the drawing page.
  2. Glue one endpoint [image] of the Communicates shape to a connection point [image] on an Actor shape. Glue the other endpoint to a connection point on a Use Case shape.
  3. If you want to add an arrow to indicate the flow of information, do the following:
  • Double-click the Communicates shape, then, under Association, click the end you want to edit, and then click Properties.
  • In the Association End category, check IsNavigable, click OK, then click OK again.
  • Right-click the Communicates shape and click Shape Display Options. Under End options, select End navigability, and then click OK.

  6. Use Uses and Extends shapes to indicate the relationships between use cases.

Work with Uses shapes

Work with Extends shapes

Click to show or hide information. Indicate a uses relationship between two use cases

  1. In a use case diagram, drag a Uses relationship shape onto the drawing page.
  2. Glue the Uses endpoint (without an arrowhead) to a connection point [image] on the Use Case shape that uses the behavior of the other use case.
  3. Glue the Uses endpoint (with an arrowhead) to a connection point on the use case being used.
  4. Double-click the Uses shape to open the UML Generalization Properties dialog box. Add property values, and then click OK.

Click to show or hide information. Indicate an extends relationship between two use cases

  1. In a use case diagram, drag an Extends shape onto the drawing page.
  2. Glue the Extends endpoint [image] without an arrowhead to a connection point [image] on the use case providing the extension.
  3. Glue the Extends endpoint with an arrowhead to a connection point on the base use case.
  4. Double-click the Extends shape to open the UML Generalization Properties dialog box. Add the property values, and then click OK.

  7. Double-click any shape (except the System Boundary shape) to open its UML Properties dialog box where you can add a name, attributes, operations, and other property values.
  8. Save the diagram.


Add a note to a UML diagram

  1. Drag a Note shape from any UML stencil onto the drawing page and place it near the elements you want to add a note for.
  2. Drag the control handle [image] in the middle of the note to create a pointer. If you want to associate the note with a specific element, glue the control handle on the pointer to a connection point [image] on the other element.
  3. Double-click the Note shape. Type a name for the note if you want. Under Documentation, type the text for the note, and then click OK.


Add or edit UML element attributes

  1. Double-click the icon in the tree view or the shape in a diagram that represents the element.
  2. Do one of the following:
  • To add attributes, click Attributes, click New. Type or choose the attribute properties you want. Or, click on the next empty row in the attribute list and start typing a name; a new attribute is automatically added.
  • To edit attributes, click Attributes and select the attribute you want to edit. Type or choose the attribute properties you want.
  3. To specify additional properties, click Properties. Type or choose the attribute properties you want.
  4. Click OK, and then click OK again.

Click to show or hide information. Tip

You can also add attributes to a UML element by right-clicking the element's icon in the tree view or its shape in a diagram, and then choosing Properties on the shortcut menu.


Add a constraint to a UML element

  1. Double-click the icon in the tree view or the shape in the diagram representing the element you want to add constraints to.
  2. Click Constraints and then click New. Type or choose the constraint properties you want.
  3. To specify additional constraint properties, click Properties. Type or choose the constraint properties you want.
  4. Click OK.

Click to show or hide information. Tip

You can also use the Constraint shape to add a constraint to a diagram, especially when the constraint applies to several elements. Drag the Constraint shape from the Static Structure stencil onto the drawing page, and then double-click the shape. Type or choose the properties you want, and then click OK. (The description you type under Body appears on the shape.) Glue the control handle [image] in the center of the Constraint shape to a connection point [image] on the shape that the constraint applies to.


Add or edit UML element operations

  1. Double-click the icon in the tree view or the shape in a diagram that represents the element.
  2. Do one of the following:
  • To add an operation, click Operations. Type or choose the operation properties you want. Or, click on the next empty row in the operations list and start typing a name; a new operation is automatically added.
  • To edit an operation, click Operations and select the operations you want to edit. Type or choose the operation properties you want.
  3. To specify additional operation properties, click Properties. Type or choose the operation properties you want.
  4. Click OK, then click OK again.

Click to show or hide information. Tip

You can also add operations to a UML element by right-clicking the element's icon in the tree view or its shape in a diagram, and then clicking Properties on the shortcut menu.


Add or edit tagged values of a UML element

  1. Double-click the icon in the tree view or the shape in the diagram representing the element you want to add tagged values to.
  2. In the element's UML Properties dialog box, click Tagged Values.
  3. Select a tagged value to edit, or click New to create a new tagged value.
  4. Type a value for the default tagged value you are editing, or type a name and value for a new tagged value. Click OK.
  5. To display the tagged values, right-click the shape in the, click Shape Display Options, and then, under General Options, select Properties to display the tagged values in brackets beneath the element name.

Click to show or hide information. Tip

When you select an icon or shape representing a UML element, documentation tagged values associated with the element display in the Documentation window. You can edit a documentation tagged value either in the Documentation window or in the element's UML Properties dialog box.


Define a new stereotype

  1. In the UML Model Diagram file that represents your system, click UML, and then click Stereotypes.
  2. In the UML Stereotypes dialog box, click New.
  3. Under name, type the name of the stereotype. You don't need to add the guillemets (<< >>). Under Base Class, choose the type of element you want the stereotype to classify.
  4. Type or choose the other options you want.
  5. To specify additional stereotype properties, click Properties. Type or select the steroetype properties you want. Click OK.
  6. Click OK.

Click to show or hide information. Tip

If you want to define a new stereotype that is similar to an existing one, you can duplicate an existing stereotype definition, and then modify it as needed. To duplicate a stereotype definition, on the UML menu, click Stereotypes, select a stereotype to duplicate, and then click Duplicate.


Name a UML element

  1. Double-click the icon in the tree view or the shape in the diagram that represents the element you want to name.
  2. Under Name, type a name to replace the default name with the name you want, and then click OK.

Click to show or hide information. Tip

You can also change the default name of an icon representing an element in the tree view by clicking the element's name, clicking the name again, and then typing the new name.


Set visibility for a UML element

  1. Double-click the icon in the tree view or the shape in the diagram representing the element you want to set visibility for.
  2. In the element's UML Properties dialog box, for Visibility, choose the visibility you want, and then click OK.


Stereotype a UML element

  1. Double-click the icon in the tree view or the shape in the diagram representing the element you want to stereotype.
  2. In the UML Properties dialog box, for Stereotype, choose the stereotype you want, and then click OK.

The stereotype appears in guillemets (<< >>) above the element name on a shape in a diagram.

Click to show or hide information. Tip

If the stereotype you want isn't listed, on the UML menu, click Stereotypes to define a new stereotype.


About reverse engineering code to the Unified Modeling Language

If you develop projects in Microsoft Visual C++, Microsoft Visual Basic, or Microsoft Visual C#, Visual Studio.NET offers an integrated software modeling solution using Microsoft Visio. From within Visual Studio, you can reverse engineer your source code into the UML (Unified Modeling Language); your project's class definitions are used to generate a UML diagram in the Visio environment.

For example, you may have inherited a legacy solution that was developed using Visual Basic or Visual C++. To better understand the structure of the solution, you can open it in Visual Studio.NET and then automatically extract its structures for viewing as elements in a UML static structure diagram. Or, you may have written a new project in Visual C# (or Visual Basic or Visual C++) and want to view its classes as graphical objects. Using the class definitions in your project, reverse engineering allows you to view the design model for your new project.

Click to show or hide information. Reverse engineer a project or an entire solution

You can reverse engineer an entire solution or a selected project within a solution. The selections you make in the Visual Studio Solution Explorer determine what is reverse engineered to the Visio UML.

Note Be sure to build the solution in Visual Studio before reverse engineering to help resolve cross-project references.

Click to show or hide information. Initiating reverse engineering in Visual Studio

In the Visual Studio environment, reverse engineering is activated from a command on the Project menu. Information from the code model is extracted, Visio is launched, and reverse-engineered elements of your code appear as icons in the tree view of the Visio UML Model Explorer. You can then drag UML class shapes that reflect class definitions in the source code onto a drawing page to visualize the architecture of the new or legacy solution.

During a reverse engineering operation, status information about the operation is written to the Visual Studio Output window.

Click to show or hide information. Launching existing Visio files from within Visual Studio

When a project has been reverse engineered, the Visio drawing is added to the solution under Solution Items. Double clicking the Visio diagram will cause Visio to launch and open the selected file.

Click to show or hide information. Working with projects in Visual Studio 6.0

If you develop projects in Visual Studio 6.0, reverse engineering from Visual C++ and Visual Basic code is supported in the current Visio Professional edition (Visio 2002).


Reverse Engineer Visual Studio.NET source code

  1. In Visual Studio.NET, open a project or solution, and in the Solution Explorer, select the solution or project that you want to reverse engineer.

Note If a solution is selected, each project in the solution is reverse engineered.

  2. In Visual Studio, on the Project menu, point to Visio UML, and then click Reverse Engineer.
  3. In the Select Visio UML File dialog box, specify options for naming and saving the Visio drawing file.
  • Under Save in, specify a location.
  • Under File name, type a file name for the UML diagram, or accept the default name. The default file name for the Visio drawing is the name of the Visual Studio solution or project you have selected.
  • Under Save as type, Visio Files (*.vsd) is set by default.
  4. To start reverse engineering and open the new file in Visio, click Save.

The UML Reverse Engineer dialog box appears, showing progress of the operation. To stop the current reverse-engineering operation, click Cancel.

  5. In Visio, drag icons from the tree view onto the drawing page to create a static structure diagram that represents a view of the model.

Click to show or hide information. How?

About adding UML elements to a model

Note If you make changes to a Visual Studio.NET project after reverse engineering the project and want to see the changes in Visio, you must rebuild the project, and reverse engineer the project again to see the updated structure of your code in the Visio UML diagram.


Reverse engineered code in the Model Explorer Tree View

Show an example

In Visio, reverse-engineered code constructs appear at various levels in the tree view of the UML Model Explorer. At the top is the UML System level, which contains subsequent levels for models, subsystems, packages, and classes that have been reverse engineered. All of the elements represented by these icons and folders can be renamed.

In addition, a default set of packages is included that contains for C#, C++, IDL, and Visual Basic data types. You cannot rename these default folders.

Click to show or hide information. UML system

A blue, red and green triangular icon at the very top of the Model Explorer, representing the UML System

The UML system is a container for the UML models that you develop. In the tree view, the system is represented by a unique icon and given the default name UML System.

Click to show or hide information. Model

Green folder icon with text: Static Model

Under the UML system icon is the UML model level, represented by a green folder icon. A solution in Visual Studio is reverse engineered at the model level as Static Model.

You can add and delete a model to a UML system, but there must be at least one model in a UML system.

Click to show or hide information. Top package

Yellow folder icon with text: Top Package

Namespaces in Visual Studio are reverse engineered as packages. The global namespace becomes the global package, named Top Package by default.

The top package is represented by the yellow folder icon that is used for all package folders in the tree view.

Click to show or hide information. SubSystem

Red folder representing a UML Subsystem folder named BLL

Projects in Visual Studio are reversed engineered as UML subsystems. Nested projects are reverse engineered as nested subsystems. A subsystem can contain an entire model within a system.

A reverse engineered subsystem is named for the project it represents and shown in the tree view by a red folder icon. For example, BLL is the name of the project reverse engineered in the FMStocks7 sample.

You can add a subsystem to a UML model using the Subsystem shape from the UML Static Structure diagram stencil.

Click to show or hide information. Nested packages

2 yellow folder icons, with BLL nested under FMStocks7

You can have multiple levels of nested packages in a UML model. Each nested package is represented by a yellow folder icon in the tree view, with the name of the package it represents. For example, the folder icon for the package BLL is nested under the folder icon for the package FMStocks7.

You can add a package to a UML model using the Package shape from the UML Static Structure stencil.

UML Package shape icon -- like file folder with tab top left

Click to show or hide information. Classes

White square icon in Model Explorer, representing the class Account

User-defined classes in the source code are reverse engineered as classes containing attributes, operations, and properties. Reverse-engineered classes are represented in the UML tree view by icons named for the class definitions. Classes appear in the tree view according to where they have been defined.

You can add a class to a UML model using the Class shape from the UML Static Structure stencil.

UML Class shape icon -- three stacked rectangles, smaller on top

Note Classes for which references can't be resolved are reverse engineered as classes under a package named External Classes. This situation occurs if a solution or project is not built before reverse engineering.


About language mapping from Visual Studio.NET to Visio UML

The correspondence, or mapping, between source code constructs and Visio UML elements is similar for code written in both Visual Basic.NET 7.0 and Visual C#.NET. The language mapping for code written in Visual C++.NET is closely related, with some additional C++ code constructs available for use in UML model diagrams.

The Visio UML Model Diagram supports the following language constructs for reverse-engineering code created in the programming languages included Visual Studio.NET.

Code construct in Visual C#, C++, and Visual Basic | Visio UML element
Namespace | UML package
Class | UML class
Interface | UML interface
Enum | UML data type with <<enum>> stereotype
Struct | UML class with <<struct>> stereotype
Member Operations | UML class operations
Member Variables | UML class member variables
Method Parameters | UML class member operation parameters

Click to show or hide information. Additional C# and Visual Basic code constructs supported in UML

The following language constructs are supported for C# and Visual Basic, but not for C++:

Code construct in C# and Visual Basic | Visio UML element
Property, Event, Indexer | UML operation (with corresponding tagged values as code generating options)
Delegate | UML class with <<delegate>> stereotype
Event | UML operation

Click to show or hide information. Additional C++ code construct supported in UML

The following code construct is supported for C++ only.

Code construct in C++ | Visio UML element
Union, struct | UML class with <<union>> or <<struct>> stereotype


About Microsoft Visual C# code to UML mapping

During reverse engineering, the following code constructs in Visual C# correspond to UML elements.

Click to show or hide information. Namespace

A C# Namespace is reverse engineered as a UML package, and includes:

  • Name
  • Members

Click to show or hide information. Classes

C# classes are reverse engineered as UML classes and include:

  • Name
  • Inherited classes and implemented interfaces
  • Visibility (public, protected, or private)
  • IsAbstract
  • IsLeaf
  • Base classes and implemented interfaces
  • Member operations/functions
  • Member variables

Note In C#, the following class constructs are not supported in Visio UML:

  • New
  • Internal

Click to show or hide information. Interfaces

C# interfaces are reverse engineered as UML interface shapes and include:

  • Name
  • Visibility (public, protected, or private)
  • IsLeaf
  • Base interfaces
  • Member operations

Click to show or hide information. Enumerated type

A C# enumerated type is reverse engineered as a UML data type with <<enum>> stereotype and includes:

  • Name
  • Visibility (public, protected, or private)
  • IsLeaf
  • Members

Note In C#, the information provided by base type is not supported in Visio UML.

Click to show or hide information. Struct

A struct in C# is reverse engineered as a UML class with <<struct>> stereotype, and includes:

  • Name
  • Visibility (public, protected, or private)
  • IsAbstract
  • IsLeaf
  • Base classes and implemented interfaces
  • Members

Click to show or hide information. Properties

Properties in C# are reverse engineered as UML operations and include:

  • Name
  • Visibility (public, protected, or private)
  • Type
  • Get and Set methods (added as code generation options)

Note: The following C# properties are not supported in Visio UML:

  • New
  • Internal
  • Override

Click to show or hide information. Delegates

Delegates in C# are reverse engineered as UML classes with the <<delegate>> stereotype and include:

  • Name
  • Visibility (public, protected, or private)
  • Signature (added to the class as an operation)

Click to show or hide information. Member operations

C# member operations are reverse engineered as UML operations and include:

  • Name
  • Visibility (public, protected, or private)
  • Scope (static or shared)
  • IsPolymorphic
  • IsAbstract
  • Operation kind

Operations have tags according to their type, such as constructor, destructor, property, event, indexer, or procedure. You can view these tagged values in the UML model using the Code Generation Options page of the UML Operation Properties dialog box.

  • Return type
  • Parameters

Note The following C# member operations are not supported in Visio UML:

  • New
  • Internal
  • Extern
  • Override

Click to show or hide information. Constants

Constants in C# are reverse engineered as UML attributes and include:

  • Visibility (public or private)
  • Type
  • Initial value

Constants are added to the model as attributes with the changeable field set to frozen.

Note Read-only elements in code are reverse engineered as constants.

Click to show or hide information. Member variables

C# member variables are reverse engineered as UML attributes and include:

  • Name
  • Type
  • Visibility (public, protected, or private)
  • Scope (static or shared)
  • Changeable (frozen or changeable)
  • Initial value

Click to show or hide information. Method parameters

C# method parameters are reverse engineered as UML parameters and include:

  • Name
  • Type
  • Direction (in, inout, out, or return)
  • Default value

Click to show or hide information. C# code constructs not supported in UML

The following C# code constructs won't be mapped to UML elements when reverse engineering from Visual Studio.NET to Visio.

  • Classes: new, internal, static constructors
  • Data members: new, internal
  • Enumerated type: base type
  • Events: new, internal
  • Exceptions
  • Parameter: paramArray
  • Properties: new, internal, override, sealed


About Microsoft Visual Basic 7.0 code to UML mapping

During reverse engineering, the following code constructs in Visual Basic 7.0 correspond to UML elements.

Click to show or hide information. Namespace

A Namespace in Visual Basic is reverse engineered as a UML package and includes:

  • Name
  • Members

Click to show or hide information. Class

A class in Visual Basic is reverse engineered as a UML class and includes:

  • Name
  • Inherited classes and implemented interfaces
  • Visibility (public, protected, or private)
  • IsAbstract
  • IsLeaf
  • Member operations / functions (Member variables)

The following Visual Basic class constructs are not supported in Visio UML:

  • Friend
  • Shadows

Click to show or hide information. Interface

An interface in Visual Basic is reverse engineered as a UML interface and includes:

  • Name
  • Visibility (public, protected, or private)
  • IsLeaf
  • Base interfaces
  • Member operations

Click to show or hide information. Enumerated type

An enumerated type in Visual Basic is reverse engineered as a UML data type with <<enum>> stereotype and includes:

  • Name
  • Visibility (public, protected, or private)
  • IsLeaf
  • Base classes
  • Members

Note In Visual Basic, integral types are not reverse engineered.

Click to show or hide information. Structure

A structure in Visual Basic is reverse engineered as a UML class with <<struct>> stereotype and includes:

  • Name
  • Visibility (public, protected, or private)
  • IsAbstract
  • IsLeaf
  • Base classes and implemented interfaces
  • Members

Click to show or hide information. Properties

Properties in Visual Basic are reverse engineered as UML operations and include:

  • Name
  • Visibility (public, protected, or private)
  • Type
  • Getter and Setter

Note In Visual Basic, the default property is not supported.

Click to show or hide information. Delegates

Delegates in Visual Basic are reverse engineered as UML classes with the <<delegate>> stereotype and include:

  • Name.
  • Visibility (public, protected, or private)
  • Signature (added to the class as an operation)

Click to show or hide information. Member operations

Member operations in Visual Basic are added to the UML model as UML operations and include:

  • Name
  • Visibility (public, protected, or private)
  • Scope (static or shared)
  • IsPolymorphic
  • IsAbstract
  • Operation kind

Operations are flagged according to their type, such as constructor, destructor, operator, or procedure. You can view these flags in the UML model using the Code Generation Options page of the UML Operation Properties dialog box.

  • Return type
  • Parameters
  • mustOverride

Note The following Visual Basic member operations are not supported in Visio UML:

  • Not overridable—not directly supported, maps to UML element: operation::IsLeaf
  • Overloads—not supported
  • Handles—not supported

Click to show or hide information. Events

Events in Visual Basic are added to the model as operations and include:

  • Visibility (public, protected, or private)
  • Parameters

Click to show or hide information. Constants

Constants in Visual Basic are reverse engineered as UML attributes and include:

  • Visibility (public or private).
  • Type.
  • Initial value

Constants are added to the model as attributes with the changeable field set to frozen.

For example, the Visual Basic line:

Const str As String = "some text"

will be given an initial value of:

"some text"

while

Const x As Integer = 1

will be given an initial value of 1.

Note Read-only elements in code are reverse engineered as constants.

Click to show or hide information. Member variables

Member variables in Visual Basic are added to the UML model as UML attributes and include:

  • Name
  • Type
  • Visibility (public, protected, or private)
  • Scope (static or shared)
  • Changeable (frozen or changeable)
  • Initial value

Click to show or hide information. Method parameters

Method parameters in Visual Basic are added to the UML model as UML parameters and include:

  • Name
  • Type
  • Direction (in, inout, out, or return)
  • Default value

Note The following Visual Basic parameter constructs are not supported in Visio UML:

  • Optional
  • ParamArray

Click to show or hide information. Visual Basic code constructs not supported in UML

The following Visual Basic code constructs won't be mapped to UML elements when reverse engineering from Visual Studio.NET to Visio.

  • Classes: Friend, Protected Friend, Shadows.
  • Data members: Dim, New, WithEvents.
  • Enumerated type: integral types are not reverse engineered.
  • Member operations: Overloads, Handles, , Not overridable (maps to UML element: operation::IsLeaf).
  • Parameter: optional, paramArray.
  • Property: default.


About Microsoft Visual C++ 7.0 code to UML mapping

During reverse engineering, the following code constructs in Visual C++ correspond to UML elements:

Click to show or hide information. Namespace

A C++ Namespace is reverse engineered as a UML package and includes:

  • Name
  • Members

Note Variables defined outside a class are added to a class with the stereotype <<utility>> within the namespace.

Click to show or hide information. Class

A class in C++ is reverse engineered as a UML class and includes:

  • Name
  • Inherited classes
  • Visibility (public, protected, or private)
  • IsAbstract
  • Member operations
  • Member variables

Note In C++, class definitions inside functions are not reverse engineered.

Click to show or hide information. Enum

An enumerated type in C++ is reverse engineered as a UML data type with <<enum>> stereotype and includes:

  • Name
  • Visibility (public, protected, or private)
  • IsLeaf
  • Members

Click to show or hide information. Struct

A struct in C++ is reverse engineered as a UML class with <<struct>> stereotype and includes:

  • Name
  • Visibility (public, protected, or private)
  • IsAbstract
  • IsLeaf
  • Base classes
  • Members

Click to show or hide information. Union

A union in C++ is reverse engineered as a UML class with <<union>> stereotype and includes:

  • Name
  • Visibility (public, protected, or private)
  • IsLeaf
  • Members

Click to show or hide information. Member operations

Member operations in C++ are reverse engineered as UML operations and include:

  • Name
  • Visibility (public, protected, or private)
  • Scope (local, static, or shared)
  • IsPolymorphic
  • IsAbstract
  • Operation kind

Operations are flagged according to their type, such as constructor, destructor, operator, or procedure. You can view these flags in the UML model using the Code Generation Options page of the UML Operation Properties dialog box.

  • Return type
  • Parameters

Click to show or hide information. Member variables

Member variables in C++ are reverse engineered as UML attributes and include:

  • Name
  • Type
  • Visibility (public, protected, or private)
  • Scope (local, static, or shared)
  • Changeable (frozen or changeable)
  • Initial value

Click to show or hide information. Method parameters

Method parameters in C++ are reverse engineered as UML parameters and include:

  • Name
  • Type
  • Direction (in, inout, out, or return)
  • Default value
  • Multiplicity

Multiplicity modifiers will be added to the parameter type's suffix. For example:

void Func(int *p)

will be reverse engineered as:

p: int*

Click to show or hide information. Typedef

A typedef in C++ is reverse engineered as a UML class and includes:

  • Name
  • Visibility (public, protected, or private)
  • Binding relationship to base type

Click to show or hide information. Template definitions

Template definitions in C++ are reverse engineered as UML parameterized classes and include:

  • Name
  • Parameters
  • Member variables
  • Member operations

Click to show or hide information. Other C++ code constructs that can be reverse engineered

  • Function specifier: Inline
  • Cv qualifier: Const is reverse engineered for member variables and member functions
  • Conversion-function id: operator conversion-type id
  • Operator-function id: operator operator

Click to show or hide information. C++ code constructs not supported in UML

The following C++ code constructs won't be mapped to UML elements when reverse engineering from Visual Studio.NET to a Visio UML model diagram.

Classes Class definitions inside functions are not reverse engineered.

Declaration specifier Friend is not reverse engineered.

Storage-class specifier Auto, Register, Extern, Mutable are not reverse engineered.

Function specifier Explicit is not reverse engineered.

Using directive Using namespace is not reverse engineered.

Asm definition Asm is not reverse engineered.

Linkage specification Extern is not reverse engineered.

Cv qualifier Volatile is not reverse engineered.


About reverse engineering Visual Studio 6.0 source code into the UML

If you develop projects in Microsoft Visual C++ 6.0 or Microsoft Visual Basic 6.0, you can use the UML Model Diagram solution in Microsoft Visio 2002 to reverse engineer your projects' class definitions and then generate UML static structure models.

When you install Microsoft Visio, the dynamic-link library (DLL) files that allow you to customize Visual C++ and Visual Basic are also installed. The customization adds a Visio UML Add-In toolbar to Visual C++ and Visual Basic.

The Visio UML Add-In creates a toolbar in Visual Basic that you can use to reverse engineer source code to create a UML static structure model in your Visio program. Open the Visual Basic project that contains the code you want to reverse engineer before you click the toolbar button.

The Visual C++ Visio UML Add-In uses Browse Information files to create UML models. Therefore, for Visual C++, you must generate a Browse Information file when you build the project with source code you want to reverse engineer.

The reverse engineered code elements of your model appear in the tree view of the Visio UML Model Explorer, from which you can drag icons onto a drawing page to create static structure diagrams.

You can access the properties of UML elements by double-clicking icons in the tree view or shapes on the drawing page.

Notes

  • This solution supports reverse engineering only for Visual C++ 6.0 and Visual Basic 6.0. Service Pack 3.0 for Visual Studio must be installed to use the Visio UML Add-In.
  • The language mapping and supported language constructs for reverse engineering Visual C++ and Visual Basic are not the same.

UML toolbar that appears when you customize Visual C++ or Visual Basic.

A. Open Visio button Click to start Microsoft Visio and choose the solution you want to open.

B. New Visio UML Document button Click to open the Visio UML Model Diagram solution directly.

C. Reverse Engineer UML Model button Click to reverse engineer the source code for a specific project, open the UML Model Diagram solution, and display the results as icons in the tree view.

D. Visio UML Options button (Visual C++ only) Click to set options for including or excluding MFC classes, ATL classes, or standard Include files.

E. Visio UML Help button Click to open the Visio UML Help topics on reverse engineering C++ code.


About Microsoft Visual C++ 6.0 language mapping

The Microsoft Visio UML Model Diagram solution reverse engineers any code information that is stored in the project Browse Information file. It supports the following C++ language constructs for reverse engineering Visual C++:

  • Classes include class inheritance (represented by UML generalizations), member functions, and member variables.
  • User-defined types are created as classes with member variable names.
  • Enumerated types are created as classes (type names only).
  • Member functions include visibility (public, protected, or private), scope (local, static, or shared), polymorphism, and parameters.
  • Member variables include visibility (public, protected, or private) and scope (local, static, or shared).
  • Method parameters include type and name (with some exceptions).

It's not always possible to generate the correct parameter names for a given method because of the way the Browse Information file API obtains parameter names. In such cases the integration generates default names (p0, p1, and so on).

Multiplicity modifiers are prefixed to the name of the parameter.

Notes

  • Parameter names and types are generated for methods.
  • Parameters aren't read for utility functions (those functions that are not part of a class).
  • Parameter names can only be retrieved if the method declaration exists outside the class definition due to a limitation in the browse file API. When parameter names can't be determined, the UML solution automatically generates the names (for example p0, p1, and so on).
  • Method return types aren't generated because this information isn't stored in the browse file.
  • N-to-1 associations aren't recognized in this release (but attribute type information isn't generated because this information isn't stored in the browse file).
  • Class member variables are created as UML attributes (but attribute type information isn't generated because this information isn't stored in the browse file).


Reverse engineer Microsoft Visual C++ 6.0 source code

  1. Customize Visual C++.

Click to show or hide information. How?

  1. In Visual C++, on the Tools menu, click Customize.
  2. In the Customize dialog box, click the Add-Ins And Macro Files tab.
  3. In the Add-Ins And Macro Files list, select Visio UML Add-In.

The Visio UML Add-In appears with a check mark beside it.

  4. Click Close.

The floating, five-button Visio UML Add-In toolbar appears.

  5. If you want the toolbar to be available each time you open Visual C++, dock the toolbar by dragging it to the toolbar area.

Click to show or hide information. Tip

If you want to create keyboard shortcuts for each of the Visio UML Add-In toolbar buttons, on the Tools menu click Customize, click the Keyboard tab, and then choose the Add-Ins category.

To further specify the system files you want to reverse engineer (MFC, ATL, or Include), click the Visio UML Options button [image].

  2. Generate a Browse Information file.

Click to show or hide information. How?

  1. In Visual C++, on the Project menu, click Settings.
  2. In the Project Settings dialog box, choose the type of build configuration you want, click the C/C++ tab, and then select Generate Browse Info.
  3. Click the Browse Info tab to specify the name and location of the Browse Information file, select Build Browse Info File, and then click OK.

  3. Build the project in Visual C++.

Note If you make changes to a Visual C++ project after reverse engineering the project, you must rebuild the project, and then reverse engineer the project into your Visio program to see the changes.

  4. In Visual C++, click the Reverse Engineer UML Model toolbar button [image] on the Visio UML Add-In toolbar.

If more than one project exists in the Visual C++ workspace, select the project you want to reverse engineer (in the Select Project dialog box), and then click OK.

If more than one browse file is present in the project hierarchy, select the browse file (in the Select Browse File dialog box), and then click OK.

It may take several seconds to extract the class information from the Browse Information file. When the extraction is complete, the Visio UML Model Diagram solution opens with a blank static structure diagram drawing page and a tree view in the Model Explorer, populated with icons that reflect the class definitions in the source code.

  5. In the Visio UML Model Diagram solution, drag icons from the tree view onto the drawing page to create a static structure diagram that represents a view of the model.


About Microsoft Visual Basic 6.0 language mapping

The following language constructs are supported for Visual Basic reverse engineering.

Click to show or hide information. Classes, modules, and forms

Include class type, member variables, constants, and functions and subroutines.

Class type (standard module, class module, MS form, resource file, VB form, VB MDI form, property page, user control, document object, related document, or Microsoft ActiveX designer). Class type is set through a tagged value (ClassType). Standard modules are created with the utility stereotype.

Click to show or hide information. Functions and subroutines

Include visibility (public, private, or protected), return type (functions only), and parameters.

Note Visual Basic does not have the concept of a protected class member. In reverse engineered Visual Basic code, protected is used to designate a friend property, subroutine, or function.

Click to show or hide information. Parameters

Include type, kind (in, inout, return), and default value.

Version 1.2 of the UML specification does not support multiplicity for parameters. Array dimensions are appended to the parameter name. For example:

Sub func(arr() as Integer)

would be reverse engineered as:

arr(): Integer

The default value is only set if the parameter is optional.

Click to show or hide information. Constants

Include visibility (public or private), type, and initial value.

Constants are added to the model as attributes with the changeable field set to frozen.

For example, the VB line:

Const str As String = "some text"

will be given an initial value of

"some text"

while

Const x As Integer = 1

will be given an initial value of 1.

Click to show or hide information. Member variables

Include visibility (public or private) and type.

Array dimensions are appended to the variable name. For example:

x(1 to 5, 1 to 10) as Integer

would be reverse engineered as:

x(1 to 5, 1 to 10): Integer

Click to show or hide information. Properties

Include visibility (public, private, or protected), return type (get only), and parameters.

VB properties are added to the model as methods with a stereotype of accessor. Each property accessor may have a distinct visibility.

get_, set_, or let_ is prepended to the name depending on the accessor type.

Note Visual Basic does not have the concept of a protected class member. When reverse engineering Visual Basic code, protected is used to designate a friend property, subroutine, or function.

Click to show or hide information. Events

Include visibility (public only) and parameters.

Events are added to the model as methods with the stereotype event.

Click to show or hide information. User defined types

Created as classes.

User defined types are added to the model as classes. Member attributes of the type are not created.


Reverse engineer Microsoft Visual Basic 6.0 source code

  1. Customize Visual Basic.

Click to show or hide information. How?

  1. In Visual Basic, on the Add-Ins menu, click Add-In Manager.
  2. In the Add-In Manager dialog box, select Visio UML Add-In. For Load Behavior, select Loaded/Unloaded and Load On Startup, and then click OK. The Visio UML Add-In toolbar appears.

Click to show or hide information. Tip

When the Microsoft Visio UML Add-In creates the toolbar, it also adds commands to the Tools menu. You can locate the commands by clicking Visio UML Solution on the Tools menu.

  2. Open the project that contains the source code you want to reverse engineer.
  3. In Visual Basic, click the Reverse Engineer UML Model toolbar button [image] on the Visio UML Add-In toolbar.

The Visio UML Model Diagram solution opens with a blank static structure diagram drawing page and a tree view in the UML Model Explorer, populated with icons that reflect the class definitions in the source code.

  4. In the Visio UML Model Diagram solution, drag icons from the tree view onto the drawing page to create a static structure diagram that represents a view of the model.


About generating skeleton code from UML models

To simplify the coding process, you can automatically generate code from UML static structure diagrams using Microsoft Visio. Code that includes the properties you set for UML class elements in a model diagram can be generated in Visual C#, Visual C++, or Visual Basic.

During the code-generation process, UML elements are mapped to programming code constructs in the specified target language. After you generate skeleton code from a UML model, the resulting code files are saved to the project location you have specified. You can then open the code in the target language using the source code editor of your choice.

When you generate skeleton code, the following types of files are created, depending on the target language you specify:

File type | File extension
C# source files | *.cs
C++ source file | *.cpp
Header file | *.h
Visual Basic source file | *.vb

Click to show or hide information. Generating code more than once for the same UML model

You can generate code more than once for a given UML model diagram. You may find this useful if you want to edit the UML system in Visio after generating code for the first time but before actually working with the code in a source editor.

Note After you have generated code for a specific UML system and then modified that code in a source editor, you can't return directly to the UML model in Visio to further refine or edit the same code. Each time you generate code from a UML diagram, the resulting skeleton code becomes a starting point for a new development project.

Click to show or hide information. Names for code files generated more than once

If you generate a source file for a second time from a given UML model, existing code files are not overwritten but are saved in order of creation. For example, if you generate code a second time for a C++ class named Employee, and the files Employee.h and Employee.cpp already exist in the folder, the following changes occur to the file name:

  • Employee.h is copied to Employee~1.h.
  • Employee.cpp is copied to Employee~1. cpp.

The resulting file list in the project folder then looks like this:

  • Employee.h
  • Employee.cpp
  • Employee~1.h
  • Employee~1. cpp

If you subsequently generate code for the same class, multiple versions of the generated files can result, creating, for example, Employee~2.h and Employee~2.cpp, and so on.

Click to show or hide information. Preview code in the target language

You can preview code that will be generated in your selected target language before you actually generate any souce code files. In the UML Class Properties dialog box, under Categories, click Code Generation Options, and then click Preview Code.

For example, code that will be generated in Visual C# for the UML class element Employee looks like this:

Code Preview window with code generated from example class Employee


Generate skeleton code from a UML model

  1. Set the language and project location, and then set preferences for the code constructs to be generated.

Click to show or hide information. How?

  1. Open the UML model that includes the class definition data for code generation, and from the UML menu, point to Code, and then click Preferences.
  2. For Language, select the target language from the list (C#, C++, or Visual Basic).
  3. For Project Location, type or browse to specify the project folder for the generated code files.
  4. To set or modify preferences for the generated code, select a category under Default Settings, and make changes as needed.
  • To modify the comment style in the generated code, select Language.
  • To set code template options for the generated classes, select Class.
  • To set code template options for generated attributes, select Attributes.
  • To set code template options for different kinds of operations, select Operations.
  • To set options for collections, select Relationships.
  • To create, edit, or delete code templates, select Code Templates.
  5. When you have finished setting preferences, click OK.

Click to show or hide information. Tip

To change the settings that you have modified, you can return to the last saved settings by clicking Restore Default before you click OK.

  2. To use settings other than default settings for code templates, you can either edit these templates or add new templates.

Click to show or hide information. How?

  1. Open the UML model that includes the class definition data for code generation, and from the UML menu, point to Code, and then click Preferences.

For Language and Project Location, current settings are displayed. You can make changes to these settings before creating or editing a code template.

  2. Under Default Settings, click Code Templates.
  3. For Categories, select a category for the code construct, and then do one of the following:
  • To create a new, blank template for the code category, click New.
  • To edit a template, in the Templates box, select the template and then click Edit.
  • To copy an existing template for editing, in the Templates box, select the template, and then click Duplicate.
  4. In the Edit Template dialog box, type the code conventions you want (including macros), specify a new or revised name for the template, and then click OK.
  5. In the Preferences dialog box, click OK.

  3. Check the UML model against the code to be generated to see whether any UML element properties or settings could cause compilation errors in the target language.

Click to show or hide information. How?

  1. Open the UML model that includes the class definition data for code generation.
  2. From the UML menu, point to Code, and then click Check.

Code check results and warnings, if any, appear in the Code tab of the Output window.

  3. To locate an element associated with a warning in the Code tab, double-click the warning message.

The icon for the UML element with the code error is selected in the Model Explorer tree view. If a view of the element exists on the drawing page, that shape is also selected on the page.

  4. Select the classes for which you want code to be generated.

Click to show or hide information. How?

  1. Open the UML model that includes the class definition data for code generation, and from the UML menu, point to Code, and then click Generate.

As an option, you can specify a different project folder as the Project Location for the generated code files. (Project location is initially set in the Preferences dialog box.)

  2. Under Select classes for code, expand the tree view as needed, and check the classes that you want included in the generated code.

  5. As an optional step, you can create a new Visual Studio.NET project when generating code.

Click to show or hide information. How?

  1. Open the UML model with the class definition data for code generation, and from the UML menu, point to Code, and then click Generate. In the Generate dialog box, select the classes for which you want to generate code.
  2. Under Project, select the Add Classes to Visual Studio Project check box.

Under Project, in the Name edit box, you can accept the default project name and location or specify a new name.

  3. For Template, from the list, select a template for the project you want to create.
  4. To have a solution folder created in addition to the project name and folder, select the Create directory for solution check box.

Under Solution, in the Name edit box, you can accept the default solution name or specify a new name.

  6. When you have finished setting options, click OK to generate the skeleton code.
  7. Open the generated code files in the target language using the source code editor of your choice.


Create a Visual Studio project from a UML diagram

  1. Open the UML model with the class definition data for code generation, and from the UML menu, point to Code, and then click Generate. In the Generate dialog box, select the classes for which you want to generate code.
  2. Under Project, select the Add Classes to Visual Studio Project check box.

Under Project, in the Name edit box, you can accept the default project name and location or specify a new name.

  3. For Template, from the list, select a template for the project you want to create.
  4. To have a solution folder created in addition to the project name and folder, select the Create directory for solution check box.

Under Solution, in the Name edit box, you can accept the default solution name or specify a new name.


About adding classes to a Visual Studio.NET project

In addition to generating basic source code files, you can create a new project in Visual Studio.NET Enterprise Architect from a UML diagram and add selected classes to the newly created project. Classes are added to a Visual Studio project at the same time that you generate the skeleton code, using the option Add Classes to Visual Studio Project.

Each Visual Studio project is created within a solution—either an existing solution or a new solution. When skeleton code is generated, Visio looks for an existing solution. If none is found, a new solution is created.

In addition to setting project file names and locations, you can also create a solution folder. If a solution folder is specified, then solution files are created within the solution folder, and project files are created in a sub-folder within the solution folder.

The structure of the Visual Studio project is set according to options you set in Visio using the Generate dialog box. Options include:

  • Selecting classes to include for code generation.
  • Selecting a project template and creating project-specific files.
  • Using either the default project name or a new project name.
  • Using either the default solution name or a new name for the solution.

Note If the syntax for the project name is incorrect for the selected project type, code generation is not completed.

Click to show or hide information. Example of Visual Studio files generated for a C++ project

In this example, the target language is C++, and files are generated for a Visual Studio project based on the ATL Project template. The name MyPackage1 is the project name, MySolution1 is the solution name, and Class1 is the name of the class selected for code generation in the Generate dialog box. The project is created in the folder MyPackage1 and the following source files appear, for example, in C:\MyPackage1:

File type | File name example
C++ source files | Stdafx.cpp MyPackage1.cpp Class1.cpp
H file (C++ header) | Stdafx.h Resource.h Class1.h
Resource Template | MyPackage1.rc
Visual C++ Project | MyPackage1.vcproj
Registration Script | MyPackage1.rgs
Visual Studio solution file | MySolution1.sln
Visual C++ IntelliSense Database file | MySolution1.ncb

If you also check Create directory for solution in the Generate dialog box, a solution folder is created to contain the solution files, and project files are contained in a sub-folder under the solution folder. For example, if the solution name is MySolution1, the file structure would be:

C:\MySolution1

MySolution1.sln

MySolution1.ncb

C:\MySolution1\MyPackage1

Resource.h

Class1.h

MyPackage1.rc

MyPackage1.vcproj

MyPackage1.rgs

Click to show or hide information. Example of Visual Studio files generated for a Visual Basic project

In this example, the target language is Microsoft Visual Basic, and files are generated for a Visual Studio project based on the Windows Application project template. The name MyVB_Package1 is the project name, MyVB_Solution1 is the solution name, and Class1 is the name of the class selected in the Generate dialog box. The project is created in the folder MyPackage1, and the following source files appear, for example, in C:\MyVB_Package1:

File type | Filename example
Visual Basic source files | Form1.vb Form1.resx AssemblyInfo.vb Class1.vb
Visual Basic.NET Project file | MyVB_Package1.vbproj
USER file | MyVB_Package1.vbproj.user
Visual Studio solution file | MyVB_Solution1.sln

If you also check Create directory for solution in the Generate dialog box, a solution folder is created to contain the solution files, and project files are contained in a sub-folder under the solution folder. For example, if the solution name is MyVB_Solution1, the file structure would be:

C:\MyVB_Solution1

MyVB_Solution1.sln

C:\MyVB_Solution1\MyVB_Package1

Form1.vb

Class1.vb

MyVB_Package1.vbproj

MyVB_Package1.vbproj.user

Click to show or hide information. Example of Visual Studio files generated for a C# project

In this example, the target language is Microsoft C# and files are generated for a Visual Studio project based on the Windows Application project template. The name MyCsharp_Pkg1 is the project name, MyCsharp_Sol1 is the solution name, and Class1 is the name of the class selected in the Generate dialog box. The project is created in the folder MyCsharp_Pkg1, and the following source files appear, for example, in C:\MyCsharp_Pkg1:

File type | Filename example
C# source files | Form1.cs Form1.csx AssemblyInfo.cs Class1.cs
Visual C#.NET Project file | MyCsharp_Pkg1.csproj
Visual C#.USER file | MyCsharp_Pkg1.csproj.user
Visual Studio solution file | MyCsharp_Sol1.sln

If you also check Create directory for solution in the Generate dialog box, a solution folder is created to contain the solution files, and project files are contained in a sub-folder under the solution folder. For example, if the solution name is MyCsharp_Sol1, the file structure would be:

C:\MyCsharp_Sol1

MyCsharp_Sol1.sln

C:\MyCsharp_Sol1\MyCsharp_Pkg1

Form1.cs

Form1.resx

AssemblyInfo.cs

Class1.cs

MyCsharp_PKG1. csproj

MyCsharp_Pkg1.csproj.user


About language-specific code checking

If you plan to generate code for a specific target language, use the code-checking feature before you generate the code. When you choose to check code, Visio reviews the UML model you have created and checks for potential syntax errors that may affect whether code will compile in the specified target language.

Syntax warnings appear as messages in the Code tab of the Output window, and may or may not correspond to messages in the Errors tab, which displays errors in the UML model, not in code to be generated.

Note You can generate a code skeleton from the current UML system, regardless of results obtained during the code-check process and regardless of whether any code warnings are fixed.

Check code for language-specific syntax errors


About UML model semantic error checking

As you create UML models, a semantic error checker runs by default in the background for the UML solution. Each semantic or notational error on a UML element is represented by an error message in the Errors tab of the Output window. Shapes that represent model elements with semantic errors are automatically outlined in red on the drawing page. If you double-click on the error message, the element with the error is also selected in the Model Explorer tree view.

Semantic error checking runs automatically, but you have the option to turn it off. In addition, you can run a semantic error check that is in full compliance with the UML 1.2 specification.

Note In the UML Options dialog box, the option Relax semantic error checking is set by default.

Click to show or hide information. Turn off semantic error checking

When you turn off semantic error checking, no errors are visible in the Errors tab, and shapes with errors are not outlined in red on the drawing page.

Click to show or hide information. Check for full compliance with UML 1.2 specification

When you clear the default setting Relax semantic error checking in the UML Options dialog box, the following UML rules are applied in the automatic error-checking process that occurs as you create a model.

Class can contain a nested data type

According to the UML specification, classes cannot contain nested data types. This rule is ignored when semantic error checking is relaxed:

DataType1[DataType] : [Class - WFR2] - A class can only contain classes, associations, generalizations, use cases, constraints, dependencies, collaborations and interfaces as a namespace.

Interface can be used as a parameter

According to the UML specification, interfaces cannot be used as operation parameter types. This rule is ignored when error checking is relaxed:

Parameter1[Parameter] : [Parameter - WFR1] - An interface cannot be used as the type of a parameter.

Attribute and operation can have the same name

To allow an operation and attribute to have the same name without generating an error, the following rule for attributes is ignored when error checking is relaxed:

abc[Attribute] : [Classifier - WFR4] - The name of an attribute may not be the same as the name of an opposite association end or a model element contained in the classifier.

Similar signatures are not the same

By default, a type's pre-text and post-text are not included when determining whether two operations have the same signature. To eliminate an error that occurs when two functions have the same signature, the following rule for operations is ignored when error checking is relaxed.

Operation1[Operation] : [Classifier - WFR1] - No behavioral feature of the same kind may have the same signature in a classifier.

For example, the only difference between these the two items:

operation1( p1 :bool )

and

operation1( p1 :bool[] )

is that the second includes brackets for the parameter type's post-text. If the preceding rule is ignored during error checking, all parts of the signature, including the parameter's type pre-texts and post-texts, are noted as part of the signature, so the two signatures are treated as different, not as the same.

Click to show or hide information. View semantic errors associated with a shape

If many semantic errors are listed in the Output window, you can identify errors associated with a particular shape on the drawing page by right-clicking the shape, and then clicking Display Semantic Errors.

Error information appears in the Errors tab of the Output window.

Click to show or hide information. Check elements and diagrams if red markings appear to be a mistake

If red error markings appear on shapes, and you are certain that you are using the correct UML syntax in a diagram, you may be using the elements from an incompatible diagram stencil.

For example, if a Collaboration diagram is displayed as the current page, and you drag a class shape from the Static Structure stencil to the Collaboration page, most of the added shapes will be outlined in red. This situation occurs because according to rules in the UML 1.2 specification, a Collaboration model cannot contain class model elements.


About preferences for code generation

You can set preferences for how you want the code generated from a UML diagram to look when opened in a source code editor. Options you set in the Preferences dialog box become the new global default settings for your use of Microsoft Visio.

Preferences that you can set for how code will be generated include:

  • Target language (Visual C#, Visual C++, or Visual Basic).
  • Project location for generated files.
  • Comment style for code in a specific target language.
  • Use of default or other code templates for specifying code format conventions.
  • Contents of a code template to use with a specific code construct.
  • Creation of new or revised code templates in various coding categories.

Click to show or hide information. Restore default code generation settings

While setting options in the Preferences dialog box, you can click the Restore Default button at any time before clicking OK, and any edits you just made are undone. Depending on any previous preference changes you have made, one of the following results occurs:

  • If you have not yet made any changes to the pre-set default settings, the original product defaults are restored.
  • If you have reset the global defaults for new preferences, clicking Restore Default returns any changes made in the Preferences dialog box to your last saved set of preferences.

Click to show or hide information. Override global preferences for generating code

You can override the global default settings for code generation by editing the properties of a specific element. Default settings can be modified by setting element properties for the following items:

  • Class and class-related elements.
  • Attributes and operations as part of class elements.
  • Association ends as part of relationship elements.

Click to show or hide information. Save preference settings in a Visio template

After you have finished setting preferences, you may want to save your settings to reuse with other UML system models. You can save a particular configuration of default preference settings by creating a new Visio template.


Set preferences for generating code from a UML model diagram

  1. Open the UML model that includes the class definition data for code generation, and from the UML menu, point to Code, and then click Preferences.
  2. For Language, select the target language from the list (C#, C++, or Visual Basic).
  3. For Project Location, type or browse to specify the project folder for the generated code files.
  4. To set or modify preferences for the generated code, select a category under Default Settings, and make changes as needed.
  • To modify the comment style in the generated code, select Language.
  • To set code template options for the generated classes, select Class.
  • To set code template options for generated attributes, select Attributes.
  • To set code template options for different kinds of operations, select Operations.
  • To set options for collections, select Relationships.
  • To create, edit, or delete code templates, select Code Templates.
  5. When you have finished setting preferences, click OK.

Click to show or hide information. Tip

To change the settings that you have modified, you can return to the last saved settings by clicking Restore Default before you click OK.


Save preferences for generated code in a Visio template

  1. Save the drawing with the preferences, settings, and properties that you want to reuse as a Visio template (.vst file).

Click to show or hide information. How?

  1. In the UML model containing the settings you want to save, delete all drawing pages except one.

To delete a page, right–click the page tab of the page you want to delete, and then click Delete Page.

  2. On the File menu, click Save As, and then do the following:
  • In the Save as type list, select Template (*.vst).
  • In the File name list, type a name for your template.
  • In the Save list, make sure that Workspace is checked.
  • In the Save in list, click the folder in which you want to save the template.

Note If you want the template to appear in the list that is displayed when you click New on the File menu, save it in the Software folder or one of its subfolders.

  3. Click Save.
  2. Open the saved Visio template, and then create a new UML Model Diagram. You can then use or modify the saved preference settings.

Click to show or hide information. How?

  1. Locate and open the saved template.

If you saved the template in the Software solution folder, on the File menu, point to New, point to Software, and click the name of the saved template.

If you saved the template elsewhere, on the File menu, click Open, and browse to locate the saved template file.

  2. In the new drawing file, create a new UML diagram, modifying preferences and element properties as needed.

Note The term template is used in three different ways in these topics. A Visio template defines stencils and shapes on the stencil for a drawing type; a code template is an internal code construct that helps format the code; and a project template sets up a development project in Visual Studio.


About code templates for code format conventions

Microsoft Visio provides predefined code templates that you can use to implement code format conventions when generating skeleton code. Before generating code in a target language, you can choose specific code templates to determine the structure of code definitions in the generated code.

You can select code templates other than the default for UML class, attribute, operation, and relationship elements when setting global default preferences. In addition, you can create new code templates and edit existing templates to meet your specific coding needs.

You create and edit code templates for the various code constructs in a given target language. Code constructs and available code templates vary somewhat for C#, C++, and Visual Basic, but in general you can use code templates when generating code for attributes, class headers, method definitions, and relationships, as well as with implementations for accessors, modifiers, methods, and classes.

Override global template settings using element properties

To use code templates that differ from the global preferences you have set, you can override global template settings by setting properties for an individual element in the UML model diagram.

By double-clicking a shape on the drawing page, you open the UML properties dialog box for a given element. Using options in the code-generation category for UML element properties, you can set and modify code templates for a class as a whole, a class attribute, or a class operation.

Use built-in macros to edit code templates

Each pre-defined code template may contain one or more of the built-in macros that are included in Visio. When you create or edit code templates, you can streamline your work using any of these built-in macros.

Note You cannot add your own macros or modify the meaning of a built-in macro.


Create or edit a global default code template

  1. Open the UML model that includes the class definition data for code generation, and from the UML menu, point to Code, and then click Preferences.

For Language and Project Location, current settings are displayed. You can make changes to these settings before creating or editing a code template.

  2. Under Default Settings, click Code Templates.
  3. For Categories, select a category for the code construct, and then do one of the following:
  • To create a new, blank template for the code category, click New.
  • To edit a template, in the Templates box, select the template and then click Edit.
  • To copy an existing template for editing, in the Templates box, select the template, and then click Duplicate.
  4. In the Edit Template dialog box, type the code conventions you want (including macros), specify a new or revised name for the template, and then click OK.
  5. In the Preferences dialog box, click OK.


Use built-in macros to speed up code formatting

You can use the built-in macros that are available in Microsoft Visio to help create code templates for use with code constructs such as classes, attributes, and operations. Macros are entered as text that is typed when editing code templates. When code is generated, the macro text is replaced by the actual item, name, or code that it stands for. However, if you type a macro in a template for a code construct, but the macro does not actually apply to that piece of code, the code generation engine will not attempt to expand the macro.

For example, if you are editing the template for the attribute named ‘id', and you attempt to specify the following macro text in the template:

%class_name% %attrib_name%;

the code output would look like this:

class_name id;

because %class_name% (which expands to a class name) is not applicable to the template for this attribute.

  1. Create a new template or open a template for editing by one of the following methods:
  • From the UML menu, point to Code, click Preferences, and in the Preferences dialog box, under Default Settings, select Code Templates. Select a Category, select a Template, and then click either New or Edit.
  • Double-click a class, attribute, or operation element on the drawing page or in the Model Explorer, and in the Properties dialog box for that element, click the Code Generation Options category. Select a Template, and then click Edit.
  2. In the Edit Template dialog box, type the text of the macro that you want to use. Text you type in the code template is replaced in the code that is generated. The following tables list the built-in macros in Visio.

Click to show or hide information. General list of built-in macros

When you type this macro | Macro is replaced by
%attrib_name% | The attribute name.
%class_name% | The class name.
%type_name% | The type name.
%class_name% | The class name.
%super_class_name% | The super class name.
%method_name% | The method name.
%package_name% | The package name.
When you type this macro | Macro is expanded to
%constructors% | The code for the constructor.
%operators% | The code for the operators.
%public_attributes% | The code for the definition of public attributes.
%protected_attributes% | The code for the definition of protected attributes.
%private_attributes% | The code for the definition of private attributes.
%public_methods% | The code for the definition of public methods.
%protected_methods% | The code for the definition of protected methods.
%private_methods% | The code for the definition of private methods.
%friends% | The code for the friends class.
%innerclasses% | The code for the inner classes.
When you type this macro | Macro is replaced by
%method_body% | The method body specified for the operation.
%visibility% | The element's visibility.
%comments% | The documentation specified for the element.
%class_comments% | The documentation specified for the class.
%params% | The parameters.
%params_and_comments% | The parameters and the comments associated with them.
%file_name% | The file name specified for the class.
%date% | The date the document was last saved.
%author_name% | The name of the author who created the document.

Click to show or hide information. Macros to mark code indentation

To specify indentation in the generated code, use the following two macros:

%mark_indent% | Indicates the location where indenting begins.
%indent% | Aligns and indents code to the location specified by %mark_indent%

For example, the indent macros can be used in a method header template for the following method:

void foo(int p1, int p2);

In this case:

  • The type name is: void
  • The method name is: foo
  • Parameters are: (int p1, int p2)
  • Code in the template using the indent macros looks like this:

%type_name% %method_name%(%mark_indent%

%indent%%params%

%indent%);

Code generated by template macros specified above looks like this:

void foo(

int p1,

int p2

);

  3. When you have finished editing code in the Edit Template dialog box, click OK.
  4. To view code to be generated based on current edits in the template, in the UML Properties or Preferences dialog box, click Preview code.


About code generation options for specific UML elements

Skeleton code generated in the target language you choose is formatted according to code template settings for the various UML elements. You can override these global preferences, however, by specifying code-generation options for a particular UML element.

Code-generation options are among the categories that you can select when editing UML element properties. You can set code-generation options for class and class-related elements, attributes, and operations that are part of class elements and association-related (relationship) elements.

Click to show or hide information. Code generation options for UML class elements

You can set target language, select header or implementation templates, and you can edit selected templates. Class elements include the following shapes from the UML Static Structure stencil:

Class UML Class shape icon -- three stacked rectangles, smaller on top

Utility UML Utility shape icon -- three stacked rectangles form square

Parameter Class UML Parameterized class shape -- like class shape with small box outlined top right

Bound Element Bound Element shape icon from the UML Static Structure stencil

Click to show or hide information. Code generation options for a class attribute

You can set code generation options that apply specifically to an attribute of a class (and not necessarily to the class itself). Options include setting the target language and selecting and editing templates for the attribute.

Click to show or hide information. Code generation options for a type of class operation

You can set code generation options that apply specifically to one type of operation in a class. Options include setting the target language, selecting the kind of operation you want to work with, creating and working with methods, setting file locations, and selecting and editing templates for the specified operation.

Click to show or hide information. Code generation options for an association end

You can set code generation options that apply specifically to an association end as part of an association element.

The association shapes are: Binary association shape, Composition shape, and N-ary Association shape.

Options include setting the target language and making choices for Collections, including properties for ordered, unordered, and qualified.

Click to show or hide information. Commenting your generated code

When setting properties for classes, attributes, operations, and related code constructs, you can type text in the documentation edit box for each item. All text typed is inserted as comments in the code that is generated.

You can set a preference for the comment style to be used in the target language: from the UML menu, point to Code, click Preferences, and under Default, select Language, and then set a comment style.


Set code generation options for UML class elements

  1. In the UML model diagram, double-click a Class shape.
  2. In the UML Class Properties dialog box, select the Code Generation Options category.
  3. For Target Language, select a language from the list.
  4. Under File name, for Header and for Implementation, specify a file path and file name.

  5. Under Class template, for Header and for Implementation, specify the code template you want to use for the class.

To edit the selected template, click Edit. To view changes in the generated code based on edits to the template, click Preview Code.

Note Code templates for header files apply only to C++.

  6. When you have finished setting options, click OK.


Set code generation options for a class attribute

  1. In the UML model diagram, double-click a Class shape.
  2. In the UML Class Properties dialog box, select the Attributes category.
  3. In the Attribute column, select an attribute name, and then click the Properties button.
  4. In the UML Attribute Properties dialog box, click the Code Generation Options category.
  5. Set the target language, and from the list, specify a template.

To edit the specified template, click Edit. To view changes in the generated code based on edits to the template, click Preview Code.

  6. When you have finished setting options in the UML Attribute Properties dialog box, click OK.
  7. In the UML Class Properties dialog box, click OK.


Set code generation options for a class operation

  1. In the UML model diagram, double-click a Class shape.
  2. In the UML Class Properties dialog box, select the Operations category.
  3. Under Operation, select an operation, and then click Properties.
  4. In the Operation Properties dialog box, select the Code Generation Options category.
  5. For Target Language, select a language from the list.
  6. Under Operation, for Kind, select a type of operation from the list. Types of operations available vary according to the target language.
  7. If applicable, select the Create Get/Add Method or the Create Set/Remove Method check boxes.

Note The names of these check boxes vary depending on the type of operation selected in step 6. If Event is selected for Operation kind, and either Create Add Method or Create Remove Method is selected, the generated code is a property-type event declaration. If neither of these check boxes is selected, then a field-type event declaration is generated.

  8. C++ only:Under Location, set options for Inline and file location.
  9. Under Code generation template, select the Header or Implementation template that you want to use.

To edit the specified template, click Edit. To view changes in the generated code based on edits to the template, click Preview Code.

Note Code templates for header files apply only to C++.

  10. When you have finished setting options, in the Operation Properties dialog box, click OK, and then in the UML Class Properties dialog box, click OK.


Set code generation options for an association end

  1. In the UML diagram, double-click a Binary Association shape or another association shape.
  2. In the UML Association Properties dialog box, under Categories, select Association.
  3. Under Association Ends, in the End Name column, select an association end, and then click Properties.
  4. In the UML Association End Properties dialog box, under Categories, select Code Generation Options.
  5. For Target Language, select a language from the list.
  6. Under Collections, make selections for Ordered, Unordered, and Qualified.
  7. When you have finished setting options, in the UML Association End Properties dialog box, click OK, and then in the UML Association Properties dialog box, click OK.


About mapping UML elements to generated source code

When a Visio UML model diagram is forward-engineered to one of the target languages in Microsoft® Visual Studio® .NET, UML elements are mapped to code constructs in the specified target language. In the code-generation process, the following UML shapes can be used on the drawing page to represent code constructs. Within these elements, you can specify properties and other settings to further define the skeleton code to be generated.

Click to show or hide information. UML Package element and shape

Package shape UML Package shape icon -- like file folder with tab top left

Click to show or hide information. UML Class elements and shapes

Class shape UML Class shape icon -- three stacked rectangles, smaller on top

Utility shape UML Utility shape icon -- three stacked rectangles form square

Parameterized Class shape UML Parameterized class shape -- like class shape with small box outlined top right

Bound Element shape Bound Element shape icon from the UML Static Structure stencil

Click to show or hide information. UML Association elements and shapes

Binary Association shape Binary Association shape icon -- connection double-headed arrow

Composition shape Composition shape icon from UML stencils -- connection line diamond at one end, arrow at the other

Association Class shape Association Class shape icon - double arrow on top of yellow box

Click to show or hide information. Shapes for attributes and operations of a class element

Attributes and operations of a UML class element are included as text that is part of the Class shape to which they belong.

To add an attribute or operation to a class element, double-click the Class shape, select the Attributes or Operations category, and in the UML Class Properties dialog box, click New. You can view properties of a specific attribute or operation by opening the Properties dialog box for that attribute or operation.


C# code mapping for a UML class element

In C#, a UML class element is mapped to a class containing attributes and operations that are defined in the UML class element. When code is generated for a UML class, a class declaration file is created using the name of the class with a .cs extension.

  • For each attribute in the class element, a data member is generated with the same name as the attribute.
  • For each operation in the UML class element, a method is generated with the same name as the UML operation name. The method signature is derived from the return type and parameters specified for the operation.

Click to show or hide information. Example 1: UML Class shape

Class shape with text "Employee" in the top of three rectangles

Class shape as it appears on the drawing page

In C#, the corresponding code that is generated looks like this:

namespace HumanResources

{

public class Employee

{

}

}

Click to show or hide information. Example 2: UML class with attributes and operations

In the following example, the attributes ID, FirstName, LastName, JobTitle, Salary, HireDate, and Interests have been added to the UML class element, Employee. Each of these attributes is described using the string data type, with the exception of the data type decimal for the Salary attribute.

The operations, DoWork and GiveRaise, created in the UML Class Properties dialog box, each appear as a method in the generated code.

The following illustration shows the Class shape for the Employee class (along with its attributes and operations) as it appears on the drawing page of a UML model diagram:

Class shape on drawing page for class Employee with attributes and operations

Class shape for the element Employee with text for attributes and operations

In C#, the corresponding code for the UML class element Employee is generated in the file,Employee.cs. Using the Code Preview window, you can see how the code will look in C#, the target language, before you generate the code. For the UML elements described above, generated code looks like this:

Code Preview window with code generated from example class Employee

Code Preview window with code generated for the class Employee

Click to show or hide information. Example 3: Mapping for abstract and sealed classes

Abstract classes are created using the IsAbstract option when you set class properties. C# requires that the class declaration include the keyword abstract in code that is generated for an abstract class. For example, the class definition for the abstract class Vehicle looks like this:

public abstract class Vehicle

{

}

Sealed classes are created using the IsLeaf option when you set class properties.

Click to show or hide information. Details on other UML class shapes: Utility, Association, Exception

Utility class A UML utility class is created by selecting utility from the Stereotype list in the UML Class Properties dialog box.

When code is generated, a utility class is mapped in the same way as a regular class, with one exception: by default, all methods in a utility class are class scope operations. This means that for utility classes, classifier is the default setting for the OwnerScope option in the UML Operation Properties dialog box, and in the generated code, the keyword static is placed in front of the type expression.

Association Class A UML Association Class is mapped in the same way as any other class, with this addition: association role ends are generated as private attributes in the association class, providing navigability.

Exception Class Classes are not generated for UML Exception shapes, because Exceptions are derived from Signals, which is not a classifier in the UML 1.2 specification.


C# code mapping for a UML package element

A package element in UML is mapped to a namespace in C#. A new folder with the same name as the package name is created in the project location, and all source code generated for the classes in that package is placed in this package folder.

For example, a package element given the name Human Resources looks like this in the UML diagram:

Package shape that looks like a folder icon, with the words Static Model: Human Resources

Code that is generated for this package in C# looks like this:

namespace HumanResources

{

}

To contain the generated code files, the folder for the package Human Resources appears in the designated project location. The C# source file Employee.cs corresponds to the class Employee within the Human Resources package, and appears in the package folder, illustrated as follows:

C# File icon Employee.cs in Windows Explorer with folder path


C# code mapping for attributes of a UML class element

In C#, attributes are created as data members in the order in which they are added to the UML class element. The visibility property for an attribute determines whether a data member is public, protected, or private.

Note If the data type for the attribute is a C# data type, the data type for the data member is set to the same type. If the data type for the attribute is not a C# data type, Visio maps it to an appropriate C# data type (if possible). If no direct mapping is available, an error is generated during a code check.

Following are examples of various settings for attributes and how the generated code looks in C#.

Click to show or hide information. Example 1: Mapping for a class scope attribute

If the attribute is made a class scope attribute by selecting classifier from the Ownerscope list in the UML Attributes Properties dialog box, then the keyword static is placed in front of the type–expression in the code. For example, the class Department has the attribute numEmployees, and the following options are set in the Attributes Properties dialog box:

Name: numEmployees

Type: C#::int

Visibility: private

Multiplicity: 1

OwnerScope: classifier

Code that is generated for the attribute numEmployees using the previously mentioned settings looks like this:

public class Department

{

……

// Data Members

private static int numEmployees;

}

Click to show or hide information. Example 2: Mapping for a frozen attribute

If an attribute is made frozen by selecting frozen from the Changeable list in the UML Attributes Properties dialog box, the keyword const is placed in front of the type–expression in the code. For example, the class Employee has the attribute maxTypes, and the following options are set in the UML Attributes Properties dialog box:

Name: maxTypes

Type: C#::int

Visibility: private

Multiplicity: 1

Changeable: frozen

Initial Value: 10

Code that is generated from these settings looks like this:

public class Employee

{

……

private const int maxTypes = 10;

};

Click to show or hide information. Example 3: Mapping for an attribute with an infinite number of values

If the multiplicity setting for an attribute is unrestricted—that is, the multiplicity * (zero to infinity) is chosen—the data type of the attribute is mapped to System.Collections.ArrayList. For example, the class Employee has the attribute degrees, and the following options are set in the UML Attributes Properties dialog box:

Name: degrees

Type: C#::string

Visibility: private

Multiplicity: *

Code that is generated from these settings looks like this:

public class Employee

{

……

// Data Members

System.Collections.ArrayList degrees

}

Note If multiplicity is set to 1, the attribute holds exactly one value and is mapped to a single type rather than a collection type.


C# code mapping for operations of a UML class element

For each operation defined in a UML class element, a method is created in the C# class that is generated. The method is given the same name as the operation, as follows:

return-type-expression operationName(operationArgumentList);

where

operationArgumentList = [type-expression arg1, …]

Click to show or hide information. Example 1: Mapping for abstract operations: no method defined

To create an abstract operation, first create an abstract class, and then change the default setting that defines a method for the operation.

Click to show or hide information. How?

  1. In the UML Model Explorer, right-click a package icon, point to New, and then click Class.
  2. In the UML Class Properties dialog box, type a name for the class, and then click the IsAbstract check box.
  3. Under Categories, click Operations, click New, and then click the Methods button.
  4. In the UML Method Properties dialog box, clear the Has method check box, and then click OK.
  5. In the UML Class Properties dialog box, click the Properties button, set any of the options in the UML Operations Properties dialog box, and then click OK.

Note The IsPolymorphic check box is selected by default.

  6. In the UML Class Properties dialog box, click OK.

For example, the abstract operation work is created for the class Employee, and the Has method option has been cleared. The following options appear in the UML Operation Properties dialog box:

Name: work

Return Type: <None>

IsPolymorphic: checked

Note An abstract operation must be polymorphic, so this option is checked by default.

Code that is generated will look like this:

public abstract class Employee

{

……

public abstract void work ();

}

Click to show or hide information. Example 2: Mapping for a class scope operation

If an operation is made a class scope operation by selecting classifier from the OwnerScope list in the UML Operation Properties dialog box, it is mapped to a static method in C#. For example, the class Department has the operation named getNumEmployees, and the following options are set in the UML Operation Properties dialog box:

Name: getNumEmployees

Return Type: C#::int

OwnerScope: classifier

Code that is generated will look like this:

public class Department

{

……

// Class Methods

public static int getNumEmployees()

{

}

}

Click to show or hide information. Example 3: Mapping for a polymorphic operation, virtual method

If the check box IsPolymorphic is selected in the UML Operation Properties dialog box, the operation is mapped to a virtual method.

For example, the class Employee has the operation speak, and the following options are set:

Name: speak

IsPolymorphic: checked

Code that is generated will look like this:

public class Employee

{

……

// Final Methods

public virtual void speak ()

{

}

}

Note In this case, the Has Method setting has not been changed, so by default this operation has a method, which is virtual.

Click to show or hide information. Note for the IsQuery option

If the IsQuery option is set in the UML Operation Properties dialog box, the operation is ignored because it is not supported in C#.


C# code mapping for UML binary association elements

A UML binary association adds a customizable relationship between exactly two classes. For each end, or role, in a binary association, you can set specific properties that define the relationship between the two classes.

For example, in the relationship between the Employee class and the Agency class, Employs (name for End 1) and WorksFor (name for End 2) are names for two of the roles that can be played between an agency and an employee.

Code is generated in C# according to the properties set for the association ends. Some of the variables that can influence the format and appearance of the generated code are:

  • Navigability
  • Multiplicity
  • Ordering (in collections)
  • Qualifier attributes (in qualified collections)
  • Aggregation

Click to show or hide information. Example 1: Bounded multiplicity in association roles

When navigability for one of the ends has been set to true, a data member is created in the class at the other end of the relationship. By default, the data member is given the same name as the role name for the association end and is created as a reference to the class. The visibility (public, protected, or private) for the association end determines the access modifier for the data member.

For example, a business situation using a binary association could be as follows:

  • Employees work for an agency.
  • The agency employs 100 employees.
  • Navigation is supported for the Employs role from the Agency class toward the Employee class; that is, given an agency, a particular employee can be found (navigated to).

In a UML diagram, this situation can be shown on the drawing page as follows:

Agency and Employee class shapes linked with Binary association line shape

Example of a binary association connecting the classes Employee and Agency, with two ends named WorksFor and Employs

In this example, the navigability property for the end Employs has been set to true, and the multiplicity setting is 100; that is, the agency is set to have one hundred employees. Settings of note in the UML Association End Properties (Association End category) dialog box are:

Name: Employs

Aggregation: none

Visibility: private

Multiplicity: 100

IsNavigable: checked

IsOrdered: cleared

Code that is generated from these settings looks like this:

Code Preview of generated code for agency with one hundred employees

Click to show or hide information. Example 2: Unbounded multiplicity in association roles

When the following multiplicity setting is used for one of the ends in an association, the C# code is generated as an array list: * (zero to infinity).

For example, the following options are set in the UML Association End Properties (Association End category) dialog box:

Name: Employs

Aggregation: none

Visibility: private

Multiplicity: *

IsNavigable: checked

IsOrdered: cleared

Code that is generated from these settings looks like this:

class Agency

{

// Data Members

private System.Collections.ArrayList employs;

}

Click to show or hide information. Example 3: Ordering in association roles

If one of the ends in a binary association has ordering specified along with unbounded multiplicity (*), the C# code is generated as a SortedList. For example, the following options are set in the UML Association End Properties dialog box (Association End category):

Name: Employs

Aggregation: none

Visibility: private

Multiplicity: *

IsNavigable: checked

Is Ordered: checked

Code that is generated from these settings looks like this:

public class Agency

{

// Data Members

private System.Collections.SortedList Employs ;

}

Click to show or hide information. Example 4: Aggregation settings for association roles

Aggregation settings are specified for association role ends to represent a part/whole relationship where the whole can be related to a single part, to a certain number of parts, or to many parts. For example, the relationship between a car and its engine can be described as a whole (the car) with a single part (the engine).

For composite aggregation, a data member is automatically created in the class that is the whole. In this example, the car has one engine (multiplicity:1), and Car and Engine are used as names for the association ends. For the Car end of the association (the whole), the following settings are used in the UML Association End Properties dialog box (Association End category):

Name: Car

Aggregation: composite

Visibility: private

Multiplicity: 1

IsNavigable: cleared

Code generated for the Car class using these settings looks like this:

public class Car

{

// Data Members

private Engine engine;

}

Remarks

  • For shared aggregation, a data member is created in the class representing the whole only if navigation is enabled for the association end representing the part.

  • Whether a collection or a single element is created when using aggregation depends on the multiplicity set at the association end for the part, as it does for any other binary association.

Click to show or hide information. Qualifier attributes in association roles

If one of the ends in a binary association has qualifier attributes specified along with unbounded multiplicity (*), by default the C# code is generated as follows:

System.Collections.Hashtable

Qualifier Attributes are specified in the UML Association End Properties (Association End category) dialog box.

Click to show or hide information. UML Association shapes exist only on the drawing page

UML association (relationship) shapes exist in the model only as shapes on the drawing page, not as elements in the UML Model Explorer. If you delete an association shape from the drawing page, that relationship and its properties are also removed completely from the UML model diagram.

Tip If you have accidentally deleted an association shape, click Undo on the Edit menu to replace the shape.

Note Only a few of the many options that can be set for Association Ends are mentioned in this topic.


C# code mapping for UML properties, events, indexers, delegates, and other items

By default, when you create a new operation for a class, the operation is generated as a procedure in the C# class. However, you can set the Operation Kind property for an operation to generate an event, property, indexer, constructor, destructor, or an operator.

Click to show or hide information. How?

  1. In the UML model diagram, double-click a Class shape.
  2. In the UML Class Properties dialog box, select the Operations category.
  3. Under Operation, select an operation, and then click Properties.
  4. In the UML Operation Properties dialog box, select the Code Generation Options category.
  5. Under Operation, for Kind, select a type of operation from the list. Types of operations available vary according to the target language.
  6. If applicable, select the Create Get/Add Method or the Create Set/Remove Method check boxes.

Note The names of these check boxes vary depending on the type of operation selected in step 5.

  7. When you have finished setting options, in the UML Operation Properties dialog box, click OK, and then in the UML Class Properties dialog box, click OK.

Specific rules are enforced by C# for these special operations. For example, only certain operators in C# can be overloaded and the number and type of arguments an operator can take is limited. For complete information, see the C# Language Specification, available with the documentation for Visual Studio.NET.

Click to show or hide information. Generating a C# Event

You generate a C# Event by creating a new operation and setting Operation Kind to Event. If you then want to create the add and remove methods for the event, select the Create Add Method and the Create Remove Method check boxes

  • If either of these check boxes is selected, the generated code is a property-type event declaration.
  • If neither of these check boxes is selected, a field-type event declaration is generated.

Click to show or hide information. Generating a C# Property

You generate a C# Property by creating a new operation and setting Operation Kind to Property. If you then want to generate a Get Method for the property, select the Create Get Method check box. If you want to generate a Set Method for the property, select the Create Set Method check box.

For a C# Property, either the Create Get Method or the Create Set Method check box should be selected, or you can set both options at the same time.

Click to show or hide information. Generating a C# Indexer

You generate a C# Indexer by creating a new operation and setting Operation Kind to Indexer. Then if you want to generate a Get Method for the indexer, select the Create Get Method check box. If you want to generate a Set Method for the indexer, select the Create Set Method check box.

For a C# Indexer, either the Create Get Method or the Create Set Method check box should be selected, or you can set both options at the same time.

In addition, a C# Indexer should have one or more parameters. To create a parameter for the operation, under Categories in the UML Operation Properties dialog box, click Parameters, click New, and then set options for the parameter.

Click to show or hide information. Generating C# Operators, Constructors, Destructors

You generate C# Operators, C# Constructors, and C# Destructors by creating a new operation and setting the corresponding Operation Kind in the UML Operation Properties dialog box.

Click to show or hide information. Example of C# code generated for a property, event, operator, and indexer

Different types of operations are first created as new operations in the UML Class Properties dialog box (Operations category) and then code generation options are set using the properties dialog box for each operation. For example, the following types of operation are created using different settings for Operation Kind in the UML Operation Properties dialog box (Code Generation Options category).

  • Property: NumberOfLines, created with Property selected for Operation Kind.
  • Event: Click, created with Event selected for Operation Kind.
  • Operator: +, created with Operator selected for Operation Kind.
  • Indexer: indexer, created with Indexer selected for Operation Kind.

The Matrix class can be created to contain each of these operation types. On the drawing page, text displayed as part of the Class shape for the Matrix class is described in this table:

Matrix

- NumberOfLines(): uint

+Click () : bool

++(in matrix1 : Matrix, in matrix2) : Matrix

+ indexer (in position : int) : object

Code generated from these settings looks like this:

public class Matrix

{

public event bool Click

{

add

{

}

remove

{

}

}

public static Matrix operator+(Matrix matrix1,

Matrix matrix2)

{

}

public object this[int position]

{

get

{

}

set

{

}

}

private uint NumberOfLines

{

get

{

}

set

{

}

}

}// END CLASS DEFINITION Matrix

Click to show or hide information. Generating a delegate class

Delegates in C# are equivalent to function pointers in C++, but are not directly represented in a UML diagram. You create a delegate by setting the stereotype option to delegate for a UML class element. For example, for the delegate named EventHandler, the following options would be set in the UML Class Properties dialog box (Class category):

Name: EventHandler

Stereotype: delegate

Visibility: public

In addition, when creating a delegate, you define a single operation that specifies the signature of the delegate, and that has the same name as the delegate class.

Click to show or hide information. How?

  1. In the UML Model Explorer, right-click a package icon, point to New, and then click Class.
  2. In the UML Class Properties dialog box, type a name for the class (EventHandler), and then from the Stereotype list, select delegate.
  3. Under Categories, click Operations, and then click New.
  4. Under the Operation column heading, double-click operation1 and specify a new name for the operation, for example, EventHandler.
  5. Click the Properties button, and then under Categories, click Parameters.
  6. In the UML Operation Properties dialog box (Parameters category), click New, double-click the box under the Parameter column heading, and specify a new name for the parameter, for example,sender.
  7. Under the Type column heading, from the list, select C#:: object, and then click OK twice.

Code that is generated will look like this in the Code Preview dialog box:

//Preview of code that will be generated in the implementation file:

public delegate void EventHandler(object sender);

Click to show or hide information. UML Interfaces generated as definitions only

A UML interface is mapped into a C# interface. All the operations in the interface are generated as definitions only, with no implementation of their own.


Visual Basic code mapping for a UML package element

A package element in UML is mapped to a namespace in Microsoft® Visual Basic® .NET. A new folder with the same name as the package name is created in the project location, and all source code generated for the classes in that package is placed in this package folder.

For example, a package element given the name Human Resources looks like this in the UML diagram:

Package shape that looks like a folder icon, with the words Static Model: Human Resources

Code that is generated for this package in Visual Basic looks like this:

Namespace HumanResources

To contain the generated code files, the folder for the Human Resources package appears in the designated project location.

The Visual Basic source file Employee.vb corresponds to the Employee class within the HumanResources package and appears in the package folder, for example:

C:\ TopPackage\HumanResources\

Employee.vb


Visual Basic code mapping for a UML class element

In Microsoft® Visual Basic®, a UML class element is mapped to a class containing attributes and operations that are defined in the UML class element. When code is generated for a UML class, a class declaration file is created using the name of the class with a .vb extension.

  • For each attribute in the UML class element, a data member is generated in Visual Basic with the same name as the attribute.
  • For each operation in the UML class element, a method is generated with the same name as the UML operation name.

Click to show or hide information. Example 1: UML Class shape

Class shape with text "Employee" in the top of three rectangles

Class shape as it appears on the drawing page

In Visual Basic, the corresponding code that is generated looks like this:

Namespace HumanResources

Public Class Employee

End Class

End Namespace

The visibility property of a class specifies how a class and its members are seen outside the scope of the package in which they are defined. If the Visibility property of a class is set to private in the UML Class Properties dialog box, a private class is generated in the Visual Basic code, for example:

Namespace HumanResources

Private Class Employee

End Class

End Namespace

Click to show or hide information. Example 2: UML Class with attributes and operations

In the following example, the attributes ID, FirstName, LastName, JobTitle, Salary, HireDate, and Interests have been added to the UML class element, Employee. Each of these attributes is described using the string data type, with the exception of the decimal data type for the Salary attribute.

The operations, DoWork and GiveRaise, created in the UML Class Properties dialog box, each appear as a method in the generated code.

The following illustration shows the Class shape for the Employee class (along with its attributes and operations) as it appears on the drawing page of a UML model diagram:

Class shape on drawing page for class Employee with attributes and operations

Class shape for the element Employee with text for attributes and operations

In Visual Basic, the corresponding code for the UML class element Employee is generated in the class declaration file, Employee.vb, as follows:

Public Class Employee

// Operations

Public Sub doWork()

End Sub

Public Function giveRaise(raise As Double) As Double

End Sub

// Data Members

private id as string

private firstName as string

private lastName as string

private jobTitle as string

private salary as double

private hireDate as string

protected interests as string

End Class

Click to show or hide information. Other UML class elements: Utility and Association

  • Utility class A UML utility class is created by selecting utility from the Stereotype list in the UML Class Properties dialog box.When code is generated, a utility class is mapped in the same way as a regular class, with one exception: by default, all methods in a utility class are class scope operations, and the keyword static is placed in front of the type expression in the generated code.
  • Association Class A UML Association Class is mapped in the same way as any other class, with this addition: association role ends are generated as private attributes in the association class.

Click to show or hide information. Classes not supported in Visual Basic .NET

  • Abstract classes
  • Parameterized classes


Visual Basic code mapping for attributes of a UML class element

In Microsoft® Visual Basic®, attributes are created as data members in the order in which they are added to the UML class element. The visibility property for an attribute determines whether a data member is public, protected, or private.

Click to show or hide information. Example 1: Mapping for a class scope attribute

If the attribute is made a class scope attribute by selecting classifier from the Ownerscope list in the UML Attributes Properties dialog box, the keyword shared is placed in front of the type–expression in the code. For example, the Department class has the numEmployees attribute, and the following options are set in the UML Attributes Properties dialog box:

Name: numEmployees

Type: VB::int

Visibility: private

Multiplicity: 1

OwnerScope: classifier

Code that is generated for the numEmployees attribute using the previously mentioned settings looks like this:

public class Department

……

// Data Members

private shared numEmployees;

End Class

Click to show or hide information. Example 2: Mapping for a frozen attribute

If an attribute is made frozen by selecting frozen from the Changeable list in the UML Attributes Properties dialog box, the keyword const is placed in front of the type–expression in the Visual Basic code. For example, the Employee class has the maxTypes attribute, and the following options are set in the UML Attributes Properties dialog box:

Name: maxTypes

Type: VB::int

Visibility: private

Multiplicity: 1

Changeable: frozen

Initial Value: 10

Visual Basic code that is generated from these settings looks like this:

public class Employee

……

private const maxTypes As Integer = 10;

Endd Class

Click to show or hide information. Example 3: Mapping for an attribute with an infinite number of values

If the multiplicity setting for an attribute is unrestricted—that is, the multiplicity * (zero to infinity) is chosen—the data type of the attribute is mapped to System.Collections.ArrayList. For example, the Employee class has the degrees attribute, and the following options are set in the UML Attributes Properties dialog box:

Name: degrees

Type: VB::string

Visibility: private

Multiplicity: *

Code that is generated from these settings looks like this:

public class Employee

……

// Data Members

private degrees As System.Collections.ArrayList

End Class

Note If multiplicity is set to 1, the attribute holds exactly one value and is mapped to a single type rather than a collection type.


Visual Basic code mapping for operations of a UML class element

For each operation defined in a UML class element, a method is created in the Microsoft® Visual Basic® class that is generated in the code. The method in Visual Basic is given the same name as the operation, as follows:

Procedure_modifier Sub/Function operationName(operationArgumentList) As return-type-expression

where

operationArgumentList = [arg1 As type-expression, …]

Remarks

  • If the operation includes a parameter list, each parameter is included by specifying the type-expression, the argument name and the default value, if any.
  • All operations with the same visibility are grouped together.

If the operation has a return type, it is created as a Function; if the operation has no return type, it is created as a Sub.

Click to show or hide information. Example 1: Mapping for an abstract operation: no method defined

If the operation is defined as abstract, the operation is mapped to a method in Visual Basic with no implementation.

Example:

public MustInherit class Employee

……

public MustOverride Sub work()

End Class

Some rules for creating abstract operations are:

  • Only abstract classes can have abstract operations.
  • Visibility cannot be set to private for abstract operations.
  • OwnerScope cannot be set to classifier for abstract operations

Click to show or hide information. Example 2: Mapping for a class scope operation

If an operation is made a class scope operation by selecting classifier from the OwnerScope list in the UML Operation Properties dialog box, it is mapped to a static method in Visual Basic. For example, the Department class has the operation named getNumEmployees, and the following options are set in the UML Operation Properties dialog box:

Name: getNumEmployees

Return Type: VB::int

OwnerScope: classifier

Visual Basic code that is generated will look like this:

Example:

public class Department

……

// Class Methods

public static Function getNumEmployees() As Integer

End Function

End Class

Click to show or hide information. Example 3: Mapping for a polymorphic operation, virtual method

If the check box IsPolymorphic is selected in the UML Operation Properties dialog box, the operation is mapped to a virtual method.

For example, the Employee class has the speak operation, and the following options are set:

Name: speak

IsPolymorphic: checked

Code that is generated will look like this:

public class Employee

……

public Overridable Sub speak()

End Sub

End Class

Note In this case, the Has Method setting has not been changed, so by default this operation has a method, which is virtual.

Click to show or hide information. IsQuery option is not supported

If the IsQuery option is set in the UML Operation Properties dialog box, the operation is ignored because it is not supported in Visual Basic.


Visual Basic code mapping for UML binary association elements

A UML binary association adds a customizable relationship between exactly two classes. For each end—or role—in a binary association, you can set specific properties that define the relationship between the two classes.

For example, in the relationship between the Employee class and the Agency class, Employs (name for End 1) and WorksFor (name for End 2) are names for two of the roles that can be played between an agency and an employee.

Code is generated in Microsoft® Visual Basic® according to the properties set for the association ends. Some of the variables that can influence the format and appearance of the generated code are:

  • Navigability
  • Multiplicity
  • Ordering (in collections)
  • Qualifier attributes (in qualified collections)
  • Aggregation

Click to show or hide information. Example 1: Bounded multiplicity in association roles

When navigability for one of the ends has been set to true, a data member is created in the class at the other end of the relationship. By default, the data member is given the same name as the role name for the association end and is created as a reference to the class. The visibility (public, protected, or private) for the association end determines the access modifier for the data member.

For example, a business situation using a binary association could be as follows:

  • Employees work for an agency.
  • The agency employs 100 employees.
  • Navigation is supported for the role Employs from the Agency class toward the Employee class; that is, given an agency, a particular employee can be found (navigated to).

In a UML diagram, this situation can be shown on the drawing page as follows:

Agency and Employee class shapes linked with Binary association line shape

Example of a binary association connecting the classes Employee and Agency, with two ends named WorksFor and Employs

In this example, the navigability property for the end Employs has been set to true, and the multiplicity setting is 100; that is, the agency is set to have one hundred employees. Settings of note in the UML Association End Properties (Association End category) dialog box are as follows:

Name: Employs

Aggregation: none

Visibility: private

Multiplicity: 100

IsNavigable: checked

IsOrdered: cleared

Code in Visual Basic that is generated from these settings for the Agency class looks like this:

Public Class Agency

Private Employs() As Employee = new Employee(100) {}

End Class ' END CLASS DEFINITION Agency

Click to show or hide information. Example 2: Unbounded multiplicity in association roles

When the following multiplicity setting is used for one of the ends in an association, the Visual Basic code is generated as an array list: * (zero to infinity).

For example, the following options are set in the UML Association End Properties (Association End category) dialog box:

Name: Employs

Aggregation: none

Visibility: private

Multiplicity: *

IsNavigable: checked

IsOrdered: cleared

Code in Visual Basic that is generated from these settings for the Agency class looks like this:

Public Class Agency

// Data Members

private employs As System.Collections.ArrayList

End Class

Click to show or hide information. Example 3: Ordering in association roles

If one of the ends in a binary association has ordering specified along with unbounded multiplicity (*), the Visual Basic code is generated as a SortedList.

Click to show or hide information. Example 4: Aggregation settings for association roles

Aggregation settings are specified for association role ends to represent a part/whole relationship where the whole can be related to a single part, to a certain number of parts, or to many parts. Options for composite or share aggregation are set in the the UML Association End Properties dialog box (Association End category). Code mapping for UML aggregation settings in Visual Basic is very similar to code that is generated in C#.

Click to show or hide information. UML association shapes exist only on the drawing page

UML association (relationship) shapes exist in the model only as shapes on the drawing page, not as elements in the UML Model Explorer. If you delete an association shape from the drawing page, that relationship and its properties are also removed completely from the UML model diagram.

Tip If you have accidentally deleted an association shape, click Undo on the Edit menu to replace the shape.

Note Only a few of the many options that can be set for Association Ends are mentioned in this topic.


Visual Basic code mapping for UML properties, events, procedures, and other items

By default, when you create a new operation for a class, the operation is generated as a method in the Microsoft® Visual Basic® class. However, you can set the Operation Kind property for an operation to generate an event, property, constructor, destructor, or a procedure in Visual Basic.

Click to show or hide information. How?

  1. In the UML model diagram, double-click a Class shape.
  2. In the UML Class Properties dialog box, select the Operations category.
  3. Under Operation, select an operation, and then click Properties.
  4. In the UML Operation Properties dialog box, select the Code Generation Options category.
  5. Under Operation, for Kind, select a type of operation from the list.
  6. If applicable, select the Create Get or the Create Set Method check boxes.
  7. When you have finished setting your options, in the UML Operation Properties dialog box, click OK, and then in the UML Class Properties dialog box, click OK.

Click to show or hide information. UML interfaces generated as definitions only

A UML interface is mapped into a Visual Basic interface. All the operations in the interface are generated as definitions only, with no implementation of their own. For example:

public Interface Animal

public Sub walk()

public Sub eat()

End Interface

Click to show or hide information. UML items not supported in Visual Basic

  • Indexers
  • Parameterized Classes (Templates)
  • Instantiated Classes


C++ code mapping for a UML package element

A package element in UML is mapped to a namespace in C++. A new folder with the same name as the package name is created in the project location, and all source code for the classes generated in that package is placed in the new package folder.

For example, a package element given the name Human Resources looks like this in the UML diagram:

Package shape that looks like a folder icon, with the words Static Model: Human Resources

Code that is generated for this package in C++ looks like this:

namespace HumanResources

{

}

To contain the generated code files, the folder for the HumanResources package appears in the designated project location. The C++ source files Employee.h and Employee.cpp correspond to the Employee class within the HumanResources package, and appear in the package folder; for example:

C:\ TopPackage\HumanResources\

  • Employee.h
  • Employee.cpp


C++ code mapping for a UML class element

In C++, a UML class element is mapped to a class containing attributes and operations defined in the UML class element. When code is generated for a UML class, two files are created:

A header file using the name of the class with an .h extension.

A declaration file using the name of the class with a .cpp extension.

In the class definition:

  • For each attribute in the class element, a data member is generated with the same name as the attribute.
  • For each operation in the UML class element, a method is generated with the same name as the UML operation name. The method signature is derived from the return type and parameters specified for the operation.

Click to show or hide information. Example 1: UML Class shape

Class shape with text "Employee" in the top of three rectangles

Class shape as it appears on the drawing page

In C++, the corresponding code that is generated looks like this:

Employee.h

// Static Model

#ifndef __EMPLOYEE__

#define __EMPLOYEE__

namespace HumanResources

{

    class Employee

    {

    };// END CLASS DEFINITION Employee

} // HumanResources

#endif // __EMPLOYEE__

Employee.cpp

// Static Model

#include "Employee.h"

namespace HumanResources

{

} // HumanResources

Click to show or hide information. Example 2: UML Class with attributes and operations

In the following example, the attributes ID, FirstName, LastName, JobTitle, Salary, HireDate, and Interests have been added to the UML class element, Employee. Each of these attributes is described using the char data type, with the exception of the float data type for the Salary attribute.

The operations DoWork and GiveRaise, created in the UML Class Properties dialog box, each appear as a method in the generated code.

The Class shape for the Employee class, along with its attributes and operations, appears on the drawing page of a Visio UML model diagram.

In C++, the corresponding code for the UML Employee class element is generated in the files, Employee.h and Employee.cpp. Using the Code Preview window, you can see how the code will look in C++, (the target language) before you generate the code.

Click to show or hide information. Example 3: Mapping for abstract classes

The C++ language definition does not provide a means by which a class can be declared as abstract. However, when you set class properties and check the IsAbstract option, all methods within the class definition are polymorphic and are thus generated as virtual. For example, the definition for the Vehicle class (which has IsAbstract checked), with the Drive operation, looks like this:

Vehicle.h

// Static Model

#ifndef __VEHICLE__

#define __VEHICLE__

class Vehicle

{

public:

virtual void Drive();

};// END CLASS DEFINITION Vehicle

#endif // __VEHICLE__

Vehicle.cpp

// Static Model

#include "Vehicle.h"

void Vehicle::Drive()

{

}

Click to show or hide information. Details on other UML class shapes: Utility, Association, Exception

Utility class A UML utility class is created by selecting utility from the Stereotype list in the UML Class Properties dialog box.

When code is generated, a utility class is mapped to a namespace where by default, all methods are class-scoped operations. This means that for utility classes, classifier is the default setting for the OwnerScope option in the UML Operation Properties dialog box, and in the generated code, the keyword static is placed in front of the type expression.

Association Class A UML Association class is mapped the same as any other class.

Exception Class Classes are not generated for UML Exception shapes because Exceptions are derived from Signals, which is not a classifier in the UML 1.2 specification.


C++ code mapping for attributes of a UML class element

In C++, attributes are created as data members in the order in which they are added to the UML class element. The visibility property for an attribute determines whether a data member is public, protected, or private.

Following are examples of various settings for attributes and how the code that is generated looks in C++.

Click to show or hide information. Example 1: Mapping for a class scope attribute

If the attribute is made into a class scope attribute by selecting classifier from the Ownerscope list in the UML Attributes Properties dialog box, the keyword static is placed in front of the type–expression in the code. For example, the Department class has the numEmployees attribute, and the following options are set in the Attributes Properties dialog box:

Name: numEmployees

Type: C++::int

Visibility: private

Multiplicity: 1

OwnerScope: classifier

Code that is generated for the numEmployees attribute using these settings looks like this:

Department.h

// Static Model

#ifndef __DEPARTMENT__

#define __DEPARTMENT__

class Department

{

private:

static int numEmployees;

};// END CLASS DEFINITION Department

#endif // __DEPARTMENT__

Department.cpp

// Static Model

#include "Department.h"

int Department::numEmployees;

Click to show or hide information. Example 2: Mapping for a frozen attribute

If an attribute is made frozen by selecting frozen from the Changeable list in the UML Attributes Properties dialog box, the keyword const is placed in front of the type–expression in the code. For example, the Employee class has the maxTypes attribute, and the following options are set in the UML Attributes Properties dialog box:

Name: maxTypes

Type: C++::int

Visibility: private

Multiplicity: 1

Changeable: frozen

Initial Value: 10

Code that is generated from these settings looks like this:

Employee.h

// Static Model

#ifndef __EMPLOYEE__

#define __EMPLOYEE__

class Employee

{

private:

const int maxTypes;

};// END CLASS DEFINITION Employee

#endif // __EMPLOYEE__

Employee.cpp

// Static Model

#include "Employee.h"

Remarks

  • The initial value (in this instance, 10) is only generated if the OwnerScope of the attribute is set to Classifier (static).
  • Initial values are generated for operations where Kind is set to Constructor (if defined).

Click to show or hide information. Example 3: Mapping for an attribute with an infinite number of values

If the multiplicity setting for an attribute is unrestricted—that is, the multiplicity * (zero to infinity) is chosen—the data type of the attribute is mapped by default to the std::set template class. This template class is an unordered collection as defined in the Microsoft® Visual C++® Standard Template Library/STL.

Note Default settings can be overridden using the Code Generation Preferences dialog box.

For example, the Employee class has the degrees attribute, and the following options are set in the UML Attributes Properties dialog box:

Name: degrees

Type: C++::char

Visibility: private

Multiplicity: *

Code that is generated from these settings looks like this:

Employee.h

// Static Model

#ifndef __EMPLOYEE__

#define __EMPLOYEE__

class Employee

{

private:

std::set<char> degrees[80];

};// END CLASS DEFINITION Employee

#endif // __EMPLOYEE__

Employee.cpp

// Static Model

#include "Employee.h"

Note If multiplicity is set to 1, the attribute holds exactly one value and is mapped to a simple type rather than a set type.


C++ code mapping for operations of a UML class element

Each UML class operation maps to a class method with the same name as the operation as follows:

return-type-expression operationName(operationArgumentList);

where

operationArgumentList = [type-expression arg1, …]

Click to show or hide information. Example 1: Mapping for abstract operations: No method defined

To create an abstract operation, first create an abstract class, and then change the default setting that defines a method for the operation.

Click to show or hide information. How?

  1. In the UML Model Explorer, right-click a package icon, point to New, and then click Class.
  2. In the UML Class Properties dialog box, type a name for the class, and then click the IsAbstract check box.
  3. Under Categories, click Operations, click New, and then click Methods.
  4. In the UML Method Properties dialog box, clear the Has method check box, and then click OK.
  5. In the UML Class Properties dialog box, click Properties, set any of the options in the UML Operations Properties dialog box, and then click OK.

Note The IsPolymorphic check box is selected by default.

  6. In the UML Class Properties dialog box, click OK.

Note A normal operation can be defined using the above steps by leaving the IsAbstract check box cleared and the Has method check box checked (the default).

For example, the abstract operation work is created for the Employee class, and the Has method option has been cleared (creating a pure-virtual function). The following options appear in the UML Operation Properties dialog box:

Name: work

Return Type: <None>

IsPolymorphic: checked

Note An abstract operation must be polymorphic, so this option is checked by default.

Code that is generated from these settings looks like this:

Employee.h

// Static Model

#ifndef __EMPLOYEE__

#define __EMPLOYEE__

class Employee

{

public:

virtual void work()=0;

};// END CLASS DEFINITION Employee

#endif // __EMPLOYEE__

Employee.cpp

// Static Model

#include "Employee.h"

Click to show or hide information. Example 2: Mapping for a class scope operation

If an operation is made into a class scope operation by selecting classifier from the OwnerScope list in the UML Operation Properties dialog box, it is mapped to a static method in C++. For example, the Department class has the operation named getNumEmployees, and the following options are set in the UML Operation Properties dialog box:

Name: getNumEmployees

Return Type: C++::int

OwnerScope: classifier

Code that is generated from these settings looks like this:

Department.h

// Static Model

#ifndef __DEPARTMENT__

#define __DEPARTMENT__

class Department

{

public:

static int getNumEmployees();

};// END CLASS DEFINITION Department

#endif // __DEPARTMENT__

Department.cpp

// Static Model

#include "Department.h"

int Department::getNumEmployees()

{

return int();

}

Click to show or hide information. Example 3: Mapping for a polymorphic operation, virtual method

If the check box IsPolymorphic is selected in the UML Operation Properties dialog box, the operation is mapped to a virtual method. For example, the class Employee has the operation speak, and the following options are set:

Name: speak

Return Type: <None>

Expression: <blank>

IsPolymorphic: checked

Code that is generated from these settings looks like this:

Employee.h

// Static Model

#ifndef __EMPLOYEE__

#define __EMPLOYEE__

class Employee

{

public:

virtual void speak();

};// END CLASS DEFINITION Employee

#endif // __EMPLOYEE__

Employee.cpp

// Static Model

#include "Employee.h"

void Employee::speak()

{

}

Click to show or hide information. Example 4: Mapping for a query operation

If the check box IsQuery is selected in the UML Operation Properties dialog box, the operation is mapped to a constant method. For example, the Employee class has the getAge operation, and the following options are set:

Name: getAge

Return Type: C++::float

Expression: <blank>

IsQuery: checked

Code that is generated from these settings looks like this:

Employee.h

// Static Model

#ifndef __EMPLOYEE__

#define __EMPLOYEE__

class Employee

{

public:

float getAge() const;

};// END CLASS DEFINITION Employee

#endif // __EMPLOYEE__

Employee.cpp

// Static Model

#include "Employee.h"

float Employee::getAge() const

{

}

Click to show or hide information. Example 5: Mapping for an inline operation

If the check box Inline is selected, the operation is mapped to an inline function. Inline is selected by clicking Code Generation Options under Categories in the UML Operation Properties dialog box. For the operation getAge, with the following options including the Inline check box selected and the IsQuery check box cleared:

Name: getAge

Return Type: C++::float

Expression: <blank>

IsQuery: cleared

Inline: checked

Code that is generated from these settings looks like this:

Employee.h

// Static Model

#ifndef __EMPLOYEE__

#define __EMPLOYEE__

class Employee

{

public:

float getAge()

{

return float();

}

};// END CLASS DEFINITION Employee

#endif // __EMPLOYEE__

Employee.cpp

// Static Model

#include "Employee.h"


C++ code mapping for UML binary association elements

A UML binary association adds a customizable relationship between exactly two classes. For each end, or role, in a binary association, you can set specific properties that define the relationship between the two classes.

For example, in the relationship between the Employee class and the Agency class, Employs (name for End 1) and WorksFor (name for End 2) are names for two of the roles that can be played between an agency and an employee.

Code is generated in C++ according to the properties set for the association ends. Some of the variables that can influence the format and appearance of the generated code are as follows:

  • Navigability
  • Multiplicity
  • Ordering (in collections)
  • Qualifier attributes (in qualified collections)
  • Aggregation

Click to show or hide information. Example 1: Bounded multiplicity in association roles

When navigability for one of the ends has been set to true, a data member is created in the class at the other end of the relationship. By default, the data member is given the same name as the role name for the association end and is created as a reference to the class. The visibility (public, protected, or private) for the association end determines the access modifier for the data member.

For example, a business situation using a binary association could be as follows:

  • Employees work for an agency.
  • The agency employs 100 employees.
  • Navigation is supported for the role Employs from the class Agency toward the class Employee; that is, given an agency, a particular employee can be found (navigated to).

In a UML diagram, this situation can be shown on the drawing page as follows:

Agency and Employee class shapes linked with Binary association line shape

Example of a binary association connecting the classes Employee and Agency, with two ends named WorksFor and Employs

In this example, the navigability property for the end Employs has been set to true, and the multiplicity setting is 100; that is, the agency is set to have one hundred employees. Settings of note in the UML Association End Properties (Association End category) dialog box are as follows:

Name: Employs

Aggregation: none

Visibility: private

Multiplicity: 100

IsNavigable: checked

IsOrdered: cleared

Code that is generated from these settings in the class Agency contains an array of pointers to Employee classes and looks like this:

Agency.h

// Static Model

#ifndef __AGENCY__

#define __AGENCY__

// Include files

#include "Employee.h"

class Agency

{

private:

Employee* Employs[100];

};// END CLASS DEFINITION Agency

#endif // __AGENCY__

Agency.cpp

// Static Model

#include "Agency.h"

Click to show or hide information. Example 2: Unbounded multiplicity in association roles

When one of the following Multiplicity settings is used for one of the ends in an association, the C++ code is generated by default as a std::set template class (an unordered collection as defined in the Visual C++ Standard Template Library/STL).

For example, the following options are set in the UML Association End Properties (Association End category) dialog box:

Name: Employs

Aggregation: none

Visibility: private

Multiplicity: *

IsNavigable: checked

IsOrdered: cleared

Code that is generated from these settings looks like this:

Agency.h

// Static Model

#ifndef __AGENCY__

#define __AGENCY__

// Include files

#include "Employee.h"

class Agency

{

private:

std::set<Employee*> Employs;

};// END CLASS DEFINITION Agency

#endif // __AGENCY__

Agency.cpp

// Static Model

#include "Agency.h"

Click to show or hide information. Ordering in association roles

If one of the ends in a binary association has the IsOrdered check box checked and unbounded multiplicity, the C++ code generated by default is a std::list (ordered collection).

Ordering is specified using the IsOrdered check box in the UML Association End Properties (Association End category) dialog box.

Click to show or hide information. Qualifier attributes in association roles

If one of the ends in a binary association has Qualifier Attributes specified and unbounded multiplicity, the C++ code generated by default (this can be overridden in Code Generation Preferences) is a std::map (keyed collection).

Qualifier Attributes are specified in the UML Association End Properties (Association End category) dialog box.

Remarks

  • Only a few of the many options that can be set for Association Ends are mentioned in this topic.
  • Default settings can be overridden using the Code Generation Preferences dialog box.


C++ code mapping for other UML elements, parameters, and special operations

Click to show or hide information. Example 1: Mapping for a delegate class

Delegates in C++ are generated as functions. You create a delegate by setting the stereotype option to delegate for a UML class element. For example, for the delegate named EventHandler, the following options are set in the UML Class Properties dialog box:

Name: EventHandler

Stereotype: delegate

Visibility: public

In addition, when creating a delegate, you define a single operation that specifies the signature of the delegate, and that has the same name as the delegate class.

Click to show or hide information. How?

  1. In the UML Model Explorer, right-click a package icon, point to New, and then click Class.
  2. In the UML Class Properties dialog box, type the name for the class (EventHandler), and then from the Stereotype list, select delegate.
  3. Under Categories, click Operations, and then click New.
  4. Under the Operation column heading, double-click operation1 and specify a new name for the operation, for example, EventHandler.
  5. Click the Properties button, and then under Categories, click Parameters.
  6. In the UML Operation Properties dialog box (Parameters category), click New; double-click the box under the Parameter column heading, and specify a new name for the parameter, for example, sender.
  7. Under the Type column heading, from the list, select a type (for example C++::int), select Kind as in (input), and then click OK twice.

Code that is generated from these settings looks like this:

Eventhandler.h

// Static Model

#ifndef __EVENTHANDLER__

#define __EVENTHANDLER__

void EventHandler(int sender);

#endif // __EVENTHANDLER__

Eventhandler.cpp

// Static Model

#include "EventHandler.h"

void EventHandler(int sender)

{

}

Note The C++ code generated in operation signatures for how parameters are passed depends on the setting for parameter Kind, as follows:

  • in: pass by value.
  • out: pass by address (pointer).
  • inout: if the parameter type is a user-defined type, it is passed by reference; otherwise, by address.

Click to show or hide information. Example 2: Mapping for a template class

Template (parameter) classes in C++ are generated using the Parameter Class shape. For example, the template class MinMax provides functions returning the minimum and maximum of two values. With the following options set, code is as shown:

Name: MinMax

Template Parameter: T

Type: <unspecified>

Operation: minimum

Return Type: MinMax::T

Parameter: a

Type: MinMax::T

Kind: in

Parameter: b

Type: MinMax::T

Kind: in

Operation: maximum

Return Type: MinMax::T

Parameter: a

Type: MinMax::T

Kind: in

Parameter: b

Type: MinMax::T

Kind: in

Note When the template parameter Type is set to <unspecified> the type typename is automatically generated.

Code that is generated from these settings looks like this:

MinMax.h

// Static Model

#ifndef __MINMAX__

#define __MINMAX__

// T

template <typename T> class MinMax

{

public:

// T

T minimum(T a,

T b);

// T

T maximum(T a,

T b);

};// END CLASS DEFINITION MinMax

// T

template <typename T>

T MinMax<T>::minimum(T a,

T b)

{

}

// T

template <typename T>

T MinMax<T>::maximum(T a,

T b)

{

}

#endif // __MINMAX__

Click to show or hide information. Example 3: Mapping for a datatype

Structures (structs) in C++ are generated using the Datatype shape. It is also possible to generate enumerated types (enums) by setting the Stereotype of a datatype to enumeration. For example, the datatype WeekDays has the following options set:

Name: WeekDays

Stereotype: enumeration

Enumeration Literals: Monday = 0, Tuesday = 1, and so on.

Code that is generated from these settings looks like this:

WeekDays.h

// Static Model

#ifndef __WEEKDAYS__

#define __WEEKDAYS__

enum WeekDays

{

Monday = 0,

Tuesday = 1,

Wednesday = 2,

Thursday = 3,

Friday = 4,

Saturday = 6,

Sunday = 7

};

#endif // __WEEKDAYS__

Click to show or hide information. Example 4: Mapping for a constructor operation

Constructors and destructors in C++ can be generated by adding operations to a class and setting the operation kind option to constructor or destructor. Constructors and destructors have the same name as the class.

Click to show or hide information. How?

  1. In the UML Model Explorer, right-click a package icon, point to New, and then click Class.
  2. In the UML Class Properties dialog box, type the name for the class (Employee). Under Categories, click Operations, and then click New.
  3. Double-click the box under the Operation column heading, and specify the name for the operation: Employee.
  4. Click the Properties button. In the UML Operation Properties dialog box, under Categories, click Code Generation Options. On the Operation Kind list, click Constructor.
    Note To create a destructor, click Destructor in the Operation Kind List.
  5. Click OK twice.

For example, for the class named Employee, the following options would be set in the Code Generation Options dialog box for the Employee operation:

Name: Employee

Operation Kind: Constructor

Code that is generated from these settings looks like this:

Employee.h

// Static Model

#ifndef __EMPLOYEE__

#define __EMPLOYEE__

class Employee

{

public:

Employee();

};// END CLASS DEFINITION Employee

#endif // __EMPLOYEE__

Employee.cpp

// Static Model

#include "Employee.h"

Employee::Employee()

{

}

Click to show or hide information. Example 5: Mapping for an operator operation

Standard operators in C++ can be overloaded by adding operations to a class and setting the Operation Kind option to Operator. The names of the operations are the names of operators. Examples of operators that can be overloaded in this way are as follows:

  • =
  • ==
  • +
  • &&
  • |

For example, for the class named Employee, the following options can be set in the Code Generation Options dialog box for the == operation:

Name: ==

Operation Kind: Operator

Note that the == operation has a C++::bool return type and a single in (input) parameter of type TopPackage::Employee. To add these, go to the in the UML Operations Properties dialog box, click Categories, and then click Parameters.

Code that is generated from these settings looks like this:

Employee.h

// Static Model

#ifndef __EMPLOYEE__

#define __EMPLOYEE__

class Employee

{

public:

bool operator ==(Employee Parameter1);

};// END CLASS DEFINITION Employee

#endif // __EMPLOYEE__

Employee.cpp

// Static Model

#include "Employee.h"

bool Employee::operator ==(Employee Parameter1)

{

return bool();

}

Click to show or hide information. UML interfaces generated as a normal class

A UML interface is mapped into a standard C++ class. All the operations in the interface are generated as pure virtual functions.


Work with transition shapes (UML statechart and activity diagrams)

Click to show or hide information. Add a transition string to a transition in a statechart or activity diagram

  1. In a statechart diagram or activity diagram, double-click the Transition or Control Flow shape you want to add the transition string to.
  2. In the UML Transition Properties dialog box, click Transition, and click Event. Click New, choose the kind of event you want, and then click OK.
  3. Type a name for the event and type or choose the other property values you want. Click a tab to add constraints, tagged values, or parameters, depending on the type of event you're creating. Click OK until you return to the Transition category.
  4. Select Guard to add a guard condition. Then, in the text box, type the guard condition you want.
  5. Under Language, choose the language you want.
  6. Click the Actions tab, and then click New to create an action expression. Choose the action type you want, click OK, and then click Properties.
  7. Type a name for the action and type or choose the other property values you want. Click a tab to add details, arguments (if available), constraints, or tagged values. Click OK until you close the UML Transition Properties dialog box.

The transition string appears on the transition.

Click to show or hide information. Tip

In activity diagrams, you can use Signal Receipt and Signal Send shapes to explicitly represent event and action information usually specified in a transition string. To add the event and action information to a Signal Receipt or Signal Send shape, follow the procedure described above for adding a transition string to a transition.

Click to show or hide information. Indicate a transition between states in a statechart diagram

  1. In a statechart diagram, drag a Transition shape onto the drawing page.
  2. Glue the Transition shape endpoint (without the arrowhead) to a connection point [image] on the source State shape.
  3. Glue the Transition shape endpoint (with an arrowhead) to a connection point on the destination State shape.
  4. Double-click the Transition shape to add a transition string, including an event, guard condition, action expression, and more.

Click to show or hide information. Tip

When the source state is also the destination state in a statechart diagram, use the arc-shaped Transition shape. Glue the two endpoints on the shape to two connection points on the same State shape.

Click to show or hide information. Indicate a complex forking transition in a statechart or activity diagram

  1. In a statechart diagram or activity diagram, drag a Transition (Fork) shape onto the drawing page.
  2. Use a Transition shape to connect the source state to the Transition (Fork) bar. Glue the Transition shape endpoint (without an arrowhead) to a connection point [image] on the source state, and the Transition shape endpoint (with an arrowhead) to a connection point on the bar.
  3. Use Transition shapes to connect the Transition (Fork) bar to the destination states. Glue the Transition shape endpoints (without arrowheads) to connection points [image] on the bar, and the Transition shape endpoints (with arrowheads) to connection points on the destination states.

Click to show or hide information. Indicate a complex synchronization transition in a statechart or activity diagram

  1. In a statechart diagram or activity diagram drop a Transition (Join) shape onto the drawing page.
  2. Use Transition shapes to connect the source states to the Transition (Join) bar. Glue the Transition shape endpoints (without arrowheads) to connection points [image] on the source states, and the Transition shape endpoints with arrowheads to connection points on the bar.
  3. Use a Transition shape to connect the Transition (Join) bar to the destination state. Glue the Transition shape endpoint (without an arrowhead) to a connection point on the bar, and the Transition shape endpoint (with an arrowhead) to a connection point on the destination State.

Click to show or hide information. Indicate that a signal has been sent or received in an activity diagram

  1. In an activity diagram, drag a Signal Send or Signal Receipt shape onto the drawing page.
  2. Glue the control handle [image] of the Signal Send or Signal Receipt shape's transition to a connection point [image] on the source Action State shape.
  3. Glue the control handle [image] of the Signal Send or Signal Receipt shape's transition to a connection point on the destination Action State shape.

Click to show or hide information. Tip

To orient the Signal Send and Signal Receipt shapes properly, right-click the shape, point to Shape, and click Rotate Left or Rotate Right.

  4. Double-click the Signal Send or Signal Receipt shape to add a name, stereotype, events, actions, a guard condition, and other properties.

Note When you use a Signal Send or Signal Receipt shape instead of a regular control flow transition, the signal send or receipt symbol replaces the send signal or event label on the transition.

Click to show or hide information. Indicate the flow of control in an activity diagram

  1. In an activity diagram, drag a Control Flow shape onto the drawing page.
  2. Glue the Control Flow shape endpoint (without the arrowhead) to a connection point [image] on the source Action State or State shape.
  3. Glue the Control Flow shape endpoint (with an arrowhead) to a connection point on the destination Action State or State shape.
  4. Double-click the Control Flow shape to add a transition string, including an event, guard condition, action expression, and more.


Work with state shapes (UML statechart and activity diagrams)

Click to show or hide information. Add an internal action or activity to a state in a statechart or activity diagram

  1. In a statechart diagram or activity diagram, double-click the State shape you want to add the internal action or activity to.
  2. In the UML State Properties dialog box, click Internal Transitions.
  3. Type a name for the transition.
  4. Click Properties. Choose the event you want. To create a new event, click Events, click New, choose the kind of event you want, and then click OK.
  5. Type a name for the event and type or choose the other property values you want. Click a tab to add constraints, tagged values, or parameters, depending on the type of event you're creating. Click OK until you return to the Transition tab (UML Transition Properties dialog box).
  6. Select Guard to add a guard condition, and then in the text box, type the guard condition you want.
  7. Under Language, choose the language you want.
  8. Click the Actions tab, and then click New to create an action expression. Choose the kind of action you want. Click OK, and then click Properties.
  9. Type a name for the action and type or choose the other property values you want. Click a tab to add details, arguments, constraints, or tagged values. Click OK until you return to the Internal Transitions tab, and then click OK again.

By default, internal actions are hidden on a State shape. To show the internal actions, right-click the shape, and then click Shape Display Options. Under Suppress, clear the Transition check box.

Click to show or hide information. Add entry and exit actions to a state in a statechart or activity diagram

  1. On a statechart diagram or activity diagram, double-click the State shape you want to add an entry or exit action to.
  2. In the UML State Properties dialog box, click Entry or Exit, and then click New.
  3. Choose the action type you want, and then click OK. Type a name for the action.
  4. Click Properties to add details, arguments, constraints or tagged values. Click OK until you close the UML State Properties dialog box.

By default, entry and exit actions are hidden on a State shape. To show the actions, right-click the shape, click Shape Display Options, and then clear Transition.

Click to show or hide information. Defer events on an action state in an activity diagram

  1. In the tree view or in an activity diagram, double-click the icon or shape representing an action state.
  2. Click Deferred Events.

The events available in the package to which the action state belongs are listed. Select the events you want to be deferred by the state.


Work with composite state shapes (UML statechart diagram)

Click to show or hide information. Add a history indicator to a state region

  1. In a statechart diagram, create a state region by dragging a Composite State shape onto the drawing page.
  2. Double-click the new statechart drawing page icon in the tree view to navigate to the drawing page that represents the composite state.

In the diagram that represents the composite state or state region, drag a Shallow History or Deep History shape onto the drawing page.

  3. Use Transition shapes to indicate the transitions that come from outside the state region. Glue the endpoints of the Transition shapes with arrowheads to connection points [image] on the history indicator shape. Double-click the Transition shapes to add transition strings.
  4. Use a Transition shape to indicate the outgoing transition from the history indicator shape. Glue the Transition shape endpoint (without an arrowhead) to a connection point [image] on the history indicator shape. Glue the Transition shape endpoint (with an arrowhead) to the destination state shape.

Click to show or hide information. Create a composite or nested state in a statechart diagram

  1. In a statechart diagram, drag a Composite State shape onto the drawing page.

The composite state icon appears in the tree view and a new statechart drawing page appears that represents the composite state.

  2. Double-click the new statechart drawing page icon in the tree view to navigate to the drawing page that represents the composite state.
  3. Drag State, Transition, Shallow or Deep History indicators, and other shapes onto the drawing page to represent concurrent, mutually exclusive, or nested substates within the composite state.


Initial State shape (UML statechart diagram)

In a statechart or activity diagram, an initial state [image] represents the state of an object before any events included in the diagram have acted on it.

A transition from the initial state is usually unlabeled and represents any transition to the enclosing state. The exception is the case of a top level state machine when the transition is labeled with the event that creates the object.

There can only be one initial state in a statechart diagram but an activity diagram can have multiple initial states.

Click to show or hide information. Learn why an Initial State shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an Initial State shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.


State shape (UML statechart diagram)

In a statechart or activity diagram, a state [image] is a condition during which an object satisfies a condition, performs an action, or waits for an event. A state is an image of an instant in the life of an object that reflects the values that exist in the object's attributes and the links the object has with other objects.

A state has two compartments for optional information. The top compartment contains a name and the bottom compartment contains a list of internal actions or activities performed in response to events. When a state corresponds to ongoing activity, that activity is expressed either as a nested state machine or by a pair of entry and exit actions.

Click to show or hide information. Learn why a State shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a State shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control whether a name is displayed on the State shape

Right-click the shape, click Shape Display Options, and then select Name to display a name or clear Name to hide a name.

Click to show or hide information. Show the State shape's internal transition compartment

Right-click the shape, click Shape Display Options, and then clear the Transition check box.


Composite State shape (UML statechart diagram)

In a statechart diagram, a composite state [image] is a state that has been decomposed into concurrent (representing and relationships) or mutually exclusive (representing or relationships) substates.

Mutually exclusive states (supported in this solution) are represented by a nested state diagram within an enclosing state.

In UML, concurrent substates (not supported in this solution) are indicated by dashed lines that divide the state into subregions. Each subregion can be named and contain a nested state diagram with disjoint states.

When you drop a Composite State shape onto the drawing page, the UML solution automatically creates a new statechart diagram drawing page where you can add elements that represent the contents of the composite state.

Click to show or hide information. Learn why a Composite State shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Composite State shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control whether a name is displayed on the Composite State shape

Right-click the shape, click Shape Display Options, and then select Name to display a name or clear Name to hide a name.

Click to show or hide information. Navigate to the diagram that represents the composite state's contents

Right-click the Composite State shape, and then click Open Diagram.

Click to show or hide information. Show the Composite State shape's internal transition compartment

Right-click the shape, click Shape Display Options, and then, under Suppress, clear Transition.


Final State shape (UML statechart diagram)

In a statechart or activity diagram, a final state [image] represents the completion of activity in the enclosing state or action state. A statechart diagram can have one or more final states or, if the system never stops, no final state at all.

Click to show or hide information. Learn why a Final State shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Final State shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.


Transition shape (UML statechart diagram)

In a statechart or activity diagram, a simple transition [image] [image] is a relationship between two states or action states, or between a state and itself. (A complex transition has multiple source and/or target states.)

A simple transition indicates that an object in the first state will enter the second state and perform specified actions. The trigger that makes the transition fire is the occurrence of the event labeling the transition. A transition is shown as a solid arrow from the source state to the target state and is labeled with a transition string with the following format:

event-name (parameters) [guard condition] / action -expression > send-clause

For example:

right-mouse-down (location) [location in window] / object:=pick-object (location) > object.highlight ()

Click to show or hide information. Learn why a Transition shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Transition shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Hide a Transition shape's guard condition, events, or actions

Right-click the shape, click Shape Display Options, and then clear Guard, Event, or Action.


Transition (Fork) shape (UML statechart diagram)

In a statechart or activity diagram, a simple transition is a relationship between two states or action states or between a state and itself. A complex transition [image] [image] has multiple source and/or target states.

Click to show or hide information. Learn why a Transition (Fork) shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Transition (Fork) shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.


Transition (Join) shape (UML statechart diagram)

In a statechart or activity diagram, a simple transition is a relationship between two states or action states or between a state and itself. A complex transition [image] [image] has multiple source and/or target states.

Click to show or hide information. Learn why a Transition (Join) shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Transition (Join) shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.


Shallow History shape (UML statechart diagram)

Used in a statechart diagram, a history state indicator [image] represents the substate last visited. When a transition to the indicator fires, an object resumes the state it last had at the same level as the history indicator.

Click to show or hide information. Learn why a Shallow History shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Shallow History shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.


Deep History shape (UML statechart diagram)

Used in a statechart diagram, a history state indicator [image] represents the substate last visited. When a transition to the indicator fires, an object resumes the state it last had at the same level as the history indicator.

An asterisk ''*'' attached to the ''H'' represents deep history. When a transition to a deep history indicator fires, an object can resume a state at any depth within a complex region. A region may include both a shallow and deep history state indicator.

Click to show or hide information. Learn why a Deep History shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Deep History shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.


Decision shape (UML activity diagram)

In an activity diagram, guard conditions indicate different possible transitions from an action state. If one of these transitions leads to another decision, you can represent that decision with the traditional diamond shape. A decision [image] must have one or more incoming transitions and two or more outgoing transitions, each labeled with a distinct guard condition.

Click to show or hide information. Learn why a Decision shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Decision shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.


Action State shape (UML activity diagram)

In an activity diagram, an action state [image] is a type of state that has an internal action and at least one outgoing transition that involves the explicit events that complete the internal action. In terms of notation, an action state represents the action-expression portion of the string describing an internal action in a state. A transition leaving an action state can be labeled with guard conditions and action expressions but not with events.

Click to show or hide information. Learn why an Action State shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an Action State shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.


Control Flow shape (UML activity diagram)

A transition in an activity diagram, a control flow [image] represents a relationship between two states or action states and indicates that an object in the first state will enter the second state and perform specified actions.

The trigger that makes the transition fire is the occurrence of the event that labels the transition. A control flow is shown as solid arrow from the source state to the target state and is labeled with a transition string with the following format:

event-name (parameters) [guard condition] / action > send-clause

For example:

right-mouse-down (location) [location in window] / object:=pick-object (location) > object.highlight ()

Click to show or hide information. Learn why a Control Flow shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Control Flow shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Hide a Control Flow shape's guard condition, events, or actions

Right-click the shape, click Shape Display Options, and then clear Guard, Event, or Action.


Object Flow shape (UML activity diagram)

In an activity diagram, an object flow [image] indicates that an object is an input for or output by an action. An object flow arrow connects an object flow state either to a control flow arrow or to an action state.

When an object flow arrow supplies a redundant constraint, you can omit the control flow arrow.

Click to show or hide information. Learn why an Object Flow shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an Object Flow shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.


Object In State shape (UML activity diagram)

In an activity diagram, an object in state [image] is an object that is manipulated by a number of successive activities. Each appearance of the object indicates a different phase in its life.

To distinguish an object in one phase from that same object in another phase, the state of the object in each phase can be appended in square brackets after the object name (for example, PurchaseOrder[approved]). Object flow arrows connect objects in state to action states, states, and control flow transitions.

Click to show or hide information. Learn why an Object In State shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an Object In State shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Object In State shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.


Swimlane shape (UML activity diagram)

In an activity diagram, swimlanes [image] are a way of assigning responsibility to action states. Swimlanes are columns with solid vertical lines on each side.

Each swimlane represents the responsible class, person, or organizational unit. Each action state is assigned to only one swimlane. Transitions can cross lanes.

Click to show or hide information. Learn why a Swimlane shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Resize a Swimlane shape

  • Select the shape, and then drag a selection handle.

Click to show or hide information. Name a Swimlane shape partition and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.


Signal Receipt shape (UML activity diagram)

In an activity diagram, a signal receipt [image] can be used to replace an event label on a transition.

Unlabeled transition arrows connect the Signal Receipt shape to the previous and next action states. You can also use a dependency to connect the notch to an object representing the sender of the signal.

Click to show or hide information. Name a Signal Receipt shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.


Signal Send shape (UML activity diagram)

In an activity diagram, a signal send [image] can be used to replace an event label on a transition.

Unlabeled transition arrows connect the Signal Send shape to the previous and next action states. You can also use a dependency to connect the point to an object representing the sender of the signal.

Click to show or hide information. Name a Signal Send shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.


Indicate object flow in an activity diagram

  1. In an activity diagram, drag the Object In State shape onto the drawing page.
  2. Double-click the Object In State shape to add a name and other property values.
  3. Use an Object Flow shape to connect the Object In State shape to the Control Flow, Action State, or State shape that the object is an output from. Glue the Object Flow endpoint (with an arrowhead) to a connection point [image] on the Object In State shape and glue the other endpoint to a connection point on the Control Flow, Action State, or State shape.
  4. Use an Object Flow shape to connect the Object In State shape to the Control Flow, Action State, or State shape that the object inputs to. Glue the endpoint of the Object Flow shape with an arrowhead to a connection point on the Control Flow, Action State, or State shape and glue the other endpoint to a connection point on the Object In State shape.
  5. Double-click the Object Flow shape to add a name, actions, and other property values.


Indicate a decision in an activity diagram

  1. In an activity diagram, drag the Decision shape onto the drawing page.
  2. Double-click the Decision shape to add a name and other property values.
  3. Use a Control Flow shape to connect the action state that produced the decision with the Decision shape. Glue the Control Flow shape's endpoint (without an arrowhead) to a connection point [image] on the Action State shape and glue the Control Flow endpoint (with an arrowhead) to a connection point on the Decision shape.
  4. Use Control Flow shapes to connect the Decision shape to the possible actions resulting from the decision. Glue the Control Flow shape endpoints (without arrowheads) to connection points on the Decision shape and the Control Flow shape endpoints (with arrowheads) to connection points on the resulting action states.
  5. Double-click each control flow resulting from the decision. In the UML Transition Properties dialog box, click Transition. Select Guard, select a language, and in Body type a guard condition. Click OK.

Use the diamond shape to indicate a decision point.

Guard conditions indicate the conditions that produce each resulting action state.


Create swimlanes in an activity diagram

  1. In an activity diagram, drag a Swimlane shape onto the drawing page.
  2. Double-click the shape to add a name and other property values.
  3. Repeat steps 1 and 2 until you've added all the partitions or organizational units you need.
  4. Drag the side selection handles on the Swimlane shapes to make the lanes the size you want.
  5. Drag State, Action State, Object In State and Signal Receipt or Signal Send shapes into the areas defined by the swimlanes and connect them using Control Flow and Object Flow shapes.


Object Lifeline shape (UML sequence diagram)

Used in a sequence diagram, an object lifeline [image] represents the existence of an object at a particular time. If the object is created or destroyed during the time period the diagram represents, then the lifeline stops or starts at the appropriate point. An object's destruction is marked with a large X.

Click to show or hide information. Learn why an Object Lifeline shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an Object Lifeline shape and add other property values

Double-click the shape and then type the name you want in the UML <element> Properties dialog box.

Click to show or hide information. Control which property values are displayed on the Object Lifeline shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Display a destruction marker

Right-click the Object Lifeline shape, click Shape Display Options, and then select Destruction marker.


Lifeline shape (UML sequence diagram)

Used in a sequence diagram, a lifeline [image] shows conditionality on an object lifeline.

An object lifeline represents the existence of an object at a particular time. If the object is created or destroyed during the time period the diagram represents, the lifeline stops or starts at the appropriate point. An object's destruction is marked with a large X.

Click to show or hide information. Learn why a Lifeline shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Lifeline shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.


Activation shape (UML sequence diagram)

Used in a sequence diagram, an activation [image] shows the time period during which an object or actor is performing an action.

On an object lifeline, the activation rectangle sits on top of the lifeline. Align the top of the rectangle with the initiation time and the bottom with the completion time.

Click to show or hide information. Indicate the time during which an object in a sequence diagram is performing an action

Glue the begin point and end point on the top and bottom of an Activation shape to connection points [image] on the Object Lifeline shape.

Click to show or hide information. Change the activation's initiation or completion time

Drag a begin point or end point on the Activation shape up or down on the Object Lifeline shape until the point corresponds with the time you want.

Click to show or hide information. Name an activation and add other property values

Double-click the Activation shape when both the shape's endpoints are glued to connection points on an object lifeline, and then enter the information you want.


Message shapes (UML sequence diagram)

Used in a sequence diagram, a message [image] is a communication between objects that conveys information and results in an action.

Messages extend from the lifeline of one object to the lifeline of another, except in the case of a message from an object to itself, in which case, the message begins and ends on the same lifeline.

A message can be labeled with a name, an argument value, and a sequence expression. Variations of messages are represented in different ways:

  • Asynchronous message has a half-arrowhead.
  • Call has a solid, filled arrowhead.
  • Return has a dashed line.

Click to show or hide information. Learn why a Message shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Message shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Message shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.


Classifier Role shape (UML collaboration diagram)

A type of collaboration role, a classifier role [image] is a slot for an object in a collaboration diagram. It is represented by the class rectangle symbol with only the name compartment showing. The name compartment contains the string:

classRoleName : Classifiername

and can include a full path of enclosing packages where necessary, for example:

display_Window:Windowing System::GraphicWindows::Window

You can also show a stereotype for the class, creation/destruction markers, and a multiplicity indicator. To represent a set of objects on the ''many'' end of an association, you can use a multi-object. In the context of collaboration diagrams, Classifier Roles are often referred to as objects.

Click to show or hide information. Learn why a Classifier Role shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Classifier Role shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Classifier Role shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Hide the class name for the class with which the Classifier Role shape is associated

Right-click the Classifier Role shape, click Shape Display Options, and then clear Classifier Name.


Association Role shape (UML collaboration diagram)

A type of collaboration role, an association role [image] describes the relationship between two classifier roles in a collaboration diagram. It is represented by a path between two class role elements and can include the underlined name of the corresponding association.

In the context of collaboration diagrams, association roles are often referred to as links.

Click to show or hide information. Learn why an Association Role shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an Association Role shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Association Role shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.


Multi-Object shape (UML collaboration diagram)

In a collaboration diagram, a multi-object [image] represents a set of object roles on the ''many'' end of an association role. A multi-object is used within a collaboration to show operations that address the entire set of objects as a unit rather than a single object in it. To indicate an operation on each object in the set, use a single message that includes an iteration and add a many indicator (*) to the target role name.

Click to show or hide information. Learn why a Multi-Object shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Multi-Object shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Multi-Object shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.


Indicate that an object in a sequence diagram is destroyed

  1. In a sequence diagram drag an Object Lifeline shape onto the drawing page to represent an object that is destroyed during the interaction the sequence diagram represents.
  2. Right-click the Object Lifeline shape, click Shape Display Options, and then select Destruction marker.

Note To apply this change only to the selected shape, clear the option Apply to the same selected UML shapes in the current drawing window page in the UML Shape Display Options dialog box.

A black X appears at the end of the object's lifeline.


Indicate a message between objects in a sequence diagram

  1. In a sequence diagram, drag a Message shape onto the drawing page.

The message shape you choose depends upon the kind of message you want to send (regular, asynchronous, procedure call, or return).

  2. Glue the message endpoint (without the arrowhead) to a connection point [image] on the lifeline of the object sending the message.
  3. Glue the message endpoint (with the arrowhead) to a connection point on the lifeline of the object receiving the message.
  4. Double-click the message, and then type or choose the message name, stereotype, sequence expression, and flow kind.
  5. For a flat message or procedure call, choose the operation you want the message to generate. If the operation doesn't exist, click New to create it.

For an asynchronous message, choose the signal you want the message to generate. If no reception for the signal exists on the classifier that the object lifeline receiving the message is based on, click New to create the reception.

Click to show or hide information. Tip

To indicate a message from an object to itself, glue the two endpoints on an arc-shaped Message shape to two connection points on the same object lifeline.


Indicate transition times in a sequence diagram

  1. In the tree view, double-click click the icon representing the sequence diagram to which you want to add transition times.

The drawing page with the sequence diagram appears.

  2. On the toolbar, select the Text tool [image].
  3. On the drawing page, click where you want to add the name of the message instance, which represents the time the message is sent, and then type the name.

Usually, the name appears in the left margin of the diagram aligned with the message to which it applies. The name can be a simple letter, such as a or b.

  4. On the toolbar, select the Pointer tool [image].
  5. Drag a Constraint shape onto the drawing page near the message name. Double-click the shape, and under Body, type any constraint information relevant to the message time (for example, b - a < 1 sec). Click OK.

Click to show or hide information. Tip

If the delivery of a message is not instantaneous, slant the message line and name the time the message is received with the same letter as the time the message is sent, but add a prime (for example, a for the time sent and a‘ for the time received).

A sequence diagram with named times for when messages are sent and received.


Show conditionality on a sequence diagram object lifeline

  1. In a sequence diagram, drag a Lifeline shape onto the drawing page near the object lifeline on which you want to show conditionality.
  2. Glue the endpoints of the Lifeline shape to connection points [image] on the Object Lifeline shape. To extend the conditional lifeline, drag a control handle [image] on the Lifeline shape.
  3. Double-click the Lifeline shape to open its UML Properties dialog box where you can add a name and other property values to the lifeline.

Click to show or hide information. Tip

You can also glue the endpoints of a Lifeline shape to connection points on an Activation shape associated with an object lifeline.


Create an association role path in a collaboration diagram

  1. In a collaboration diagram, drag an Association Role shape near the two Classifier Role or Multi-Object shapes you want to create a path between.
  2. Glue the endpoints of the Association Role shape to connection points [image] on the two shapes you want to connect with a path.

Click to show or hide information. Tip

To indicate an association role path from a classifier role to itself, glue the two endpoints of a U-shaped Association Role shape to two connection points on the same classifier role.


Designate an object as new, destroyed, or transient in a collaboration diagram

  1. In a collaboration diagram, right-click the Classifier Role shape for the object you want to designate as new, destroyed, or transient, and then click Shape Display Options.
  2. Under Classifier role state, click the condition you want.

Note To apply this change only to the selected shape, in the Shape Display Options dialog box clear the option Apply to the same selected UML shapes in the current drawing window page. If you want all subsequent classifier roles shapes you drop on the diagram to have the same condition, select the Apply to subsequently dropped UML shapes of the same type in the current drawing window page check box.

The condition appears in brackets after the object name (for example, Object1{transient}).


Designate an object as active in a collaboration diagram

In a collaboration diagram, a Classifier Role shape designated as active will include {active} after the object name. A classifier role is active when the class it is based on is active.

To indicate that a class is active, double-click the shape or tree view icon that represents the class. In its UML Class Properties dialog box, click Class, check IsActive, and then click OK. The classifier role becomes active as a result of the class being active.


Add a message to an association role in a collaboration diagram

  1. In a collaboration diagram, double-click the Association Role shape to which you want to add a message.
  2. Type a name for the association role, and then click Messages.
  3. Click New. Type a name and sequence expression. Choose the stereotype, direction, and flow kind you want.
  4. For a flat message or procedure call, click Properties. Select the operation you want the message to generate. If the operation doesn't exist, click New to create it.

For an asynchronous message, choose the signal you want the message to generate. If no reception for the signal exists on the classifier that the object lifeline receiving the message is based on, click New to create the reception.


Node shape (UML component and deployment diagrams)

As used in a deployment implementation diagram, a node [image] is a run-time physical object that represents a processing resource. Nodes are usually computing devices but can also represent human resources or mechanical processing resources.

You can define a node as either a type (with a node-type name such as PC or HostMachine) or an instance (with a name and node type, such as Joe's Machine:PC or AdminServer:HostMachine).

Node instances can contain component instances and objects, and nodes can be connected to other nodes by communication associations.

Click to show or hide information. Learn why a Node shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Node shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Node shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the node

Right-click the shape, click Views, select the view you want, and then click OK.

Click to show or hide information. Change the node size

Drag a corner selection handle to resize the Node shape proportionally or a side selection handle to make the Node shape taller or wider.

Click to show or hide information. Change the depth of the node

Drag the control handle [image] up to increase node depth or down to decrease node depth.


Component shape (UML component and deployment diagrams)

In component and deployment diagrams, a component [image] is a distributable unit of implementation in a system. For example, a component can represent a physical module of code (source, binary, or executable) or a business document in a human system.

In a deployment diagram, a component instance represents an implementation unit that has identity at run time and can contain objects. A node instance can contain a component.

Click to show or hide information. Learn why a Component shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Component shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Component shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Create a diagram owned by the Component shape

Right-click the shape, click Diagrams, click New, choose the type of diagram you want, and then click OK.

Click to show or hide information. Navigate to other views of the Component shape

Right-click the shape, click Views, select the view you want, and then click OK.


Node Instance shape (UML deployment diagram)

As used in a deployment implementation diagram, a node is a run-time physical object that represents a processing resource. Nodes are usually computing devices but can also represent human resources or mechanical processing resources.

You can define a node as either a type (with a node-type name such as PC or HostMachine) or an instance (with a name and node type, such as Joe's Machine:PC or AdminServer:HostMachine).

Node instances [image] can contain component instances and objects, and nodes can be connected to other nodes by communication associations.

Click to show or hide information. Learn why a Node Instance shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Node Instance shape, choose the node of which it is an instance, and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Node Instance shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Hide the name of the node of which the node instance is an instance

Right-click the Node Instance shape, click Shape Display Options, and then clear Node Name.

Click to show or hide information. Navigate to other views of the node

Right-click the shape, click Views, select the view you want, and then click OK.

Click to show or hide information. Change node instance size

Drag a corner selection handle to resize the Node Instance shape proportionally or a side selection handle to make the shape taller or wider.

Click to show or hide information. Change the depth of a Node Instance shape

Drag the control handle [image] up to increase node depth or down to decrease node depth.


Component Instance shape (UML component and deployment diagrams)

In component and deployment diagrams, a component is a distributable unit of implementation in a system. For example, a component can represent a physical module of code (source, binary, or executable) or a business document in a human system.

In a deployment diagram, a component instance [image] represents an implementation unit that has identity at run time and can contain objects. A component could be contained within a node instance.

Click to show or hide information. Learn why a Component Instance shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Component Instance shape, choose the component of which it is an instance, and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Component Instance shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Hide the name of the component of which the component instance is an instance

Right-click the Component Instance shape, click Shape Display Options, and then clear Component Name.

Click to show or hide information. Create a diagram owned by the Component Instance shape

Right-click the shape, click Diagrams, click New, choose the type of diagram you want, and then click OK.

Click to show or hide information. Navigate to other views of the Component Instance shape

Right-click the shape, click Views, select the view you want, and then click OK.


Object shape (UML deployment diagram)

An object [image] represents a particular instance of a class. An object has a name, which is underlined to indicate an instance-level element, and attributes.

Objects usually appear in conceptual models where they represent real-world concepts and do not specify behavior; or in object diagrams, which show a snapshot of a system at a point in time. In class diagrams, objects are used mainly to show examples of data structures.

Click to show or hide information. Learn why an Object shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an Object shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Hide the attributes section of an Object shape

Right-click the shape, click Shape Display Options, and then select Attributes.

Click to show or hide information. Control which property values are displayed on the Object shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.


Composition shape (UML deployment diagram)

A composition Composition shape icon from UML stencils -- connection line diamond at one end, arrow at the other is a form of aggregation that indicates that a part may belong to only one whole and that the lifetime of the whole determines the lifetime of the part.

A composition is indicated with a solid filled diamond adornment on one of the association ends, and can be thought of as a collaboration in which all of the participants are part of a single composite object.

Click to show or hide information. Learn why a Composition shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Composition shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Composition shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the composition

Right-click the shape, click Views, select the view you want, and then click OK.


Communicates shape (UML deployment diagram)

In a deployment diagram, the communicates relationship [image] defines how packages, nodes, components, and objects communicate. You can add an arrow to the relationship to indicate the direction the information flows.

Click to show or hide information. Learn why a Communicates shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a communicates relationship and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Communicates shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Show end names and other values associated with the end of a communicates relationship

Right-click the Communicates shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of a communicates relationship

Right-click the shape, click Views, select the view you want, and then click OK.


Dependency shape (UML component and deployment diagrams)

A dependency is a relationship between two elements that indicates that changes to the source element may cause changes in the target element.

The notation for a dependency [image] is a dashed arrow, and the element at the tail of the arrow depends on the element at the arrowhead. A dependency relates the model elements themselves and doesn't require instances for its meaning. Four kinds of dependency have been predefined and are labeled with an optional stereotype: trace, refinement, usage, and binding.

Click to show or hide information. Learn why a Dependency shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Dependency shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Dependency shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the dependency

Right-click the shape, click Views, select the view you want, and then click OK.


Interface shape (UML component and deployment diagrams)

An interface [image] specifies the externally visible operations of a class, component, package, or other element without specifying internal structure.

An interface has operations but no attributes, states, or associations. In terms of notation, an interface can be represented in two ways:

  • As a class shape with the stereotype <<interface>> attached to the element that supports it by a realizes relationship.
  • By a circle, attached to the element that supports it by a solid line.

A realizes relationship is a relationship that means the client at the tail of the arrow supports or inherits all the operations of the supplier at the arrowhead. Use realizes relationships between a class (as the supplier) and its interface (when the interface is represented by a class shape with the stereotype <<interface>>), or between an implementation class (as the supplier) and a type.

Click to show or hide information. Learn why an Interface shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Change which shape displays for an interface

Right click the Interface shape and click Show as Class-like Interface or Show as Lollipop Interface.

Click to show or hide information. Name an Interface shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Interface shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the interface

Right-click the shape, click Views, select the view you want, and then click OK.

Click to show or hide information. Show, in a view, the relationships between the interface and other elements

Right-click the shape, and then click Show Relationships.

Click to show or hide information. Change the size of the circle at the end of the linear Interface shape

Drag the control handle [image].


Contain elements within a node (UML deployment diagram)

  1. In a deployment diagram, drag a Node or Node Instance shape from the UML Deployment stencil onto the drawing page.
  2. Double-click the node to add a name, attributes, operations and other property values.
  3. Drag a corner selection handle to resize the node so it can accommodate the elements you want it to contain.
  4. Drag Component, Component Instance, and Object shapes on top of the Node shape, and then connect the shapes with dependency relationships where appropriate.
  5. Do one of the following:
  • Double-click each node. In the UML Node Properties dialog box, click Components. Under Choose the components which are deployed by this node, select the appropriate components, and then click OK.
  • Double-click each component. In the UML Component Properties dialog box, click Nodes. Under Choose the nodes which deploy this component, select the appropriate nodes, and then click OK.

Important Do not group a node and the shapes it contains. If you need to move a node and the elements within it, drag a selection rectangle around the node to select all the shapes, and then drag them to the position you want.


Indicate a communication association between nodes (UML deployment diagram)

  1. In a deployment diagram, drag a Communicates shape from the UML Deployment stencil onto the drawing page.
  2. Glue one endpoint of the Communicates shape to a connection point [image] on the first node.
  3. Glue the other endpoint of the Communicates shape to a connection point on the second node.
  4. Double-click the Communicates shape to add a name and other property values to the element and to its ends.


UML Models dialog box

On the UML menu, click Models, or right-click the system model in the tree view and click Models to create, edit, or delete UML models.

Click to show or hide information. Models

Lists the current models in the UML system.

To quickly edit the most commonly used settings for a model, click a field in the Models list, and then select or type a value.

To access all of the settings for a model, select the model in the list, and then click Properties.

  • Model Double-click this field to edit an existing model name. Click New to add a new model.
  • Stereotype Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.
  • IsRoot Select to indicate that the model can't have ancestors.
  • IsLeaf Select to indicate that the model can't have descendants.
  • IsAbstract Select to indicate that the model is abstract and that no instances can be created for the class.

Click to show or hide information. New

Click to add an undefined model to the list of models in the system. An icon representing the new model is added to the tree view in the Model Explorer.

To quickly edit the most commonly used settings for a model, click a field in the Models list, and then select or type a value.

To access all of the settings for a model, select the model in the list, and then click Properties.

Click to show or hide information. Properties

After you select a model in the Models list, click to display three categories where you can edit the property values associated with the model: Model, Constraints, and Tagged Values.

Click to show or hide information. Delete

Click to delete the model selected under Models. When you click Delete, the icon representing the model is removed from the tree view in the Model Explorer.


UML State Properties dialog box (State category)

Click to show or hide information. Name

Type the name of the state as a string. No two states in the same diagram should have the same name.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML

Expand all contracted text Show All

UML <element> Properties dialog box (Exit, Entry, and Actions categories)

Use the Entry, Exit, or Actions category to add, edit, or delete actions.

Click to show or hide information. Entry Actions, Exit Actions, or Actions

Lists the actions you have defined.

To quickly edit the most commonly used settings for an action, click a field in the Actions list, and then select or type a value.

To access all of the settings for an action, select the action in the list, and then click Properties.

Click to show or hide information. New

Click to open the New Action Type dialog box, where you choose the type of action you want to add.

Click to show or hide information. Duplicate

Click to add a new action to the list with the same property values as the selected action.

Click to show or hide information. Delete

After you select an action, click to delete the action.

Click to show or hide information. Move Up

After you select an action, click to move the action higher in the list order.

Click to show or hide information. Move Down

After you select an action, click to move the action lower in the list order.

Click to show or hide information. Properties

After you select an action, click to display a specific action category (Create Action, Call Action, Local Invocation, Return Action, Send Action, Uninterpreted Action, Terminate Action, or Destroy Action), depending on the action you selected, and Details, Constraints and Tagged Values. In addition, the Arguments category appears if the action selected is a CallAction, LocalInvocation, or SendAction.


UML State Properties dialog box (Internal Transitions category)

Use the Internal Transitions category to add or delete internal transitions or edit existing ones.

Click to show or hide information. Internal Transitions

Lists the internal transitions you have defined for the state.

To quickly edit the most commonly used settings for a transition, click a field in the Internal Transitions list, and then select or type a value.

To access all of the settings for a transition, select the transition in the list, and then click Properties.

  • Transition Type a name for the internal transition.
  • Stereotype Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.
  • Event Choose the event or signal event that causes the internal transition to take place. If the event you want isn't listed, click New.

Click to show or hide information. New

Click to add an undefined transition to the list of internal transitions.

To quickly edit the most commonly used settings for a transition, click a field in the Internal Transitions list, and then select or type a value.

To access all of the settings for a transition, select the transition in the list, and then click Properties.

Click to show or hide information. Duplicate

Click to add a new transition to the list with the same property values as the selected transition.

Click to show or hide information. Delete

Click to delete the selected transition from the list.

Click to show or hide information. Properties

After you select a transition, click to display four categories where you can edit the property values associated with the internal transition: Transition, Actions, Constraints, and Tagged Values.


UML Transition Properties dialog box (Transition category)

Click to show or hide information. Name

Type a name for the internal transition.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Kind

Displays the kind of transition. The following table shows the kind of transition displayed for the various types of transition shapes.

UML Diagram Type | Shape | Kind
Activity | Signal Receipt | signal receipt
Activity | Signal Send | signal send
Activity | Object Flow | object flow
Activity | Control Flow | transition
Statechart | Transition | transition
Statechart | Transition | transition

Click to show or hide information. Event/Signal Event

Choose the event or signal event that causes the internal transition to take place. If the event you want isn't listed, click Events.

Click to show or hide information. Events

Click to create a new event. This opens the UML Events dialog box, where you can choose the type of event you want to create.

Click to show or hide information. Guard

Select if a guard condition exists that determines whether the transition will be enabled or not. The guard is evaluated when an event triggers the transition. If you select Guard, type a Boolean expression in the text box that describes the guard, using the language you specified under Language.

Click to show or hide information. Language

Choose the language you want to write the guard condition in.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


New Action Type dialog box

Use the New Action Type dialog box to choose the type of action you want to create.

Click to show or hide information. Action Type

Choose the action type you want.

Click to show or hide information. Create Action

An action that creates an instance of some classifier. When you choose this option, and then click OK, the following categories appear where you can set property values for the action: Create Action, Details, Constraints, and Tagged Values.

Click to show or hide information. Call Action

A synchronous or asynchronous action that invokes an operation on an instance. When you choose this option, and then click OK, the following categories appear where you can set property values for the action: Call Action, Arguments, Details, Constraints, and Tagged Values.

Click to show or hide information. Local Invocation

An action that invokes a local operation, that is, an operation on "self." This type of action does not generate a call event. When you choose this option, and then click OK, the following categories appear where you can set property values for the action: Local Invocation, Arguments, Details, Constraints, and Tagged Values.

Click to show or hide information. Return Action

An action that results in a value being returned to the caller. When you choose this option, and then click OK, the following categories appear where you can set property values for the action: Return Action, Details, Constraints, and Tagged Values.

Click to show or hide information. Send Action

An action that results in an asynchronous signal being sent. You can specify the signal receivers (via objectSetExpression) or leave them unspecified, in which case they are defined by some external mechanism. When you choose this option, and then click OK, the following categories appear where you can set property values for the action: Send Action, Arguments, Details, Constraints, and Tagged Values.

Click to show or hide information. Uninterpreted Action

Represents any action that is not explicitly defined in the UML. When you choose this option, and then click OK, the following categories appear where you can set property values for the action: Uninterpreted Action, Details, Constraints, and Tagged Values.

Click to show or hide information. Terminate Action

Results in the self-destruction of an object. When you choose this option, and then click OK, the following categories appear where you can set property values for the action: Terminate Action, Details, Constraints, and Tagged Values.

Click to show or hide information. Destroy Action

An action that results in the destruction of an object specified in the action. When you choose this option, and then click OK, the following categories appear where you can set property values for the action: Destroy Action, Details, Constraints, and Tagged Values.


UML Create Action Properties dialog box (Create Action category)

Click to show or hide information. Name

Type a name for the create action.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Classifier

Choose the classifier for which an instance will be created when the create action is performed.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Call Action Properties dialog box (Call Action category)

Click to show or hide information. Name

Type a name for the call action.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Mode

Choose Asynchronous if the caller does not wait until the operation is executed but continues immediately. Choose Synchronous if the caller waits until the operation is executed.

Click to show or hide information. Operation

Choose the operation being dispatched by the call action.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Local Invocation Properties dialog box (Local Invocation category)

Click to show or hide information. Name

Type a name for the local invocation.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Operation

Choose the operation being dispatched by the local invocation.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Return Action Properties dialog box (Return Action category)

Click to show or hide information. Name

Type a name for the return action.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Send Action Properties dialog box (Send Action category)

Click to show or hide information. Name

Type a name for the send action.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Signal

Choose the signal or exception being dispatched by the send action. Only signals and exceptions that have receptions on the class to which the state machine is related are listed here.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Uninterpreted Action Properties dialog box (Uninterpreted Action category)

Click to show or hide information. Name

Type a name for the uninterpreted action.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Body

Type a definition for the uninterpreted action.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Terminate Action Properties dialog box (Terminate Action category)

Click to show or hide information. Name

Type a name for the terminate action.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Destroy Action Properties dialog box (Destroy Action category)

Click to show or hide information. Name

Type a name for the destroy action.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML

Expand all contracted text Show All

UML <action type> Action Properties dialog box (Details category for the State shape)

Click to show or hide information. Recurrence Language

Choose the language you want to specify the recurrence in.

Click to show or hide information. Recurrence

Type an expression that states how many times the action should be performed using the language you specified above.


UML

Expand all contracted text Show All

UML <action type> Action Properties dialog box (Details category)

Click to show or hide information. Recurrence Language

Choose the language you want to specify the recurrence in.

Click to show or hide information. Recurrence

Type an expression that states how many times the action should be performed using the language you specified above.

Click to show or hide information. Target Language

Choose the language you want to specify the target in.

Click to show or hide information. Target

Type an ObjectSetExpression that determines the target of the action using the language you specified above.


UML

Expand all contracted text Show All

UML <action type> Action Properties dialog box (Arguments category)

Use the Arguments category to add, edit, or delete arguments.

Click to show or hide information. Arguments

Lists the parameters you have defined for the action you are creating.

To quickly edit the most commonly used settings for an argument, click a field in the Arguments list, and then select or type a value.

To access all of the settings for an argument, select the argument in the list, and then click Properties.

Click to show or hide information. Properties

After you select an argument in the list, click to display categories where you can edit the property values associated with the argument: Argument, Constraints, and Tagged Values.


UML Argument Properties dialog box (Argument category)

Click to show or hide information. Name

The argument name comes from the parameters on which the argument is based. You can't change the name.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Language

Choose the language you want to use to specify the argument value.

Click to show or hide information. Value

Type an expression, using the language you specified above, that determines the actual instance when the argument is evaluated.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Composite State Properties dialog box (Composite State category)

Click to show or hide information. Name

Type the name of the composite state as a string.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. IsConcurrent

Select if the composite state can be decomposed into components that can be executed concurrently.

Click to show or hide information. IsRegion

Select if the composite state is a substate of a concurrent state.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Composite State Properties dialog box (Internal Transitions category)

Use the Internal Transitions category to add or delete transitions or edit existing ones.

Click to show or hide information. Internal Transitions

Lists the transitions you have defined for the composite state.

To quickly edit the most commonly used settings for a transition, click a field in the Internal Transitions list, and then select or type a value.

To access all of the settings for a transition, select the transition in the list, and then click Properties.

  • Transition Type a name for the internal transition.
  • Stereotype Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.
  • Event Choose the event or signal event that causes the internal transition to take place. If the event you want isn't listed, click New.

Click to show or hide information. New

Click to add an undefined transition to the list of Internal Transitions.

To quickly edit the most commonly used settings for a transition, click a field in the Internal Transitions list, and then select or type a value.

To access all of the settings for a transition, select the transition in the list, and then click Properties.

Click to show or hide information. Duplicate

Click to add a new transition to the list with the same property values as the selected transition.

Click to show or hide information. Delete

Click to delete the selected transition from the list.

Click to show or hide information. Properties

After you select a transition, click to display the following categories, Transition, Actions, Constraints, and Tagged Values, where you can edit the property values associated with the transition: Transition, Actions, Constraints, and Tagged Values.


UML

Expand all contracted text Show All

UML <element> Properties dialog box (Pseudostate category)

Click to show or hide information. Name

Type the name of the pseudostate.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Kind

The UML solution automatically adds the kind of pseudostate that corresponds to the element whose shape or icon you selected.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Action State Properties dialog box (Action State category)

Click to show or hide information. Name

Type the name of the action state.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Partition

Choose the partition you want. You define partitions by dragging Swimlane shapes onto the drawing page, and naming the partition each swimlane represents.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Action State Properties dialog box (Deferred Events category)

Use the Deferred Events category to select the events deferred by a state.

Click to show or hide information. Choose the events which are deferred by this state

Lists the events defined for the package which includes the action state. Select the events you want.

Click to show or hide information. Select All

Click to select all the events in the list.

Click to show or hide information. Deselect All

Click to deselect all the events in the list.


UML Partition Properties dialog box (Partition category)

Click to show or hide information. Name

Type the name of the partition. Partitions are categories you use to organize states. For example, you can use partitions such as Customer, Sales, and Stockroom to indicate the departments responsible for an action state's performance. The name you type here appears in a Partition list in the UML Properties dialog box for action states so you can assign each action state to a partition.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Object Flow State Properties dialog box (Object Flow State category)

Click to show or hide information. Name

Type the name of the object flow state.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Class

Choose the class that the object in the object flow state is an instance of.

Click to show or hide information. State

Choose the state the previous action placed the object in.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Object Properties dialog box (Node Instance category)

Click to show or hide information. Name

Type a name for the node instance. The name can include a node type, separated from the name by a colon. For example, AdminServer: HostMachine.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Node

Choose the node for which the node instance is an instance.

Click to show or hide information. New

Click to create a new node.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Object Properties dialog box (Component Instance category)

Click to show or hide information. Name

Type a name for the component instance.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Component

Choose the component that the component instance is an instance of.

Click to show or hide information. New

Click to create a new component.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Datatype Properties dialog box (DataType category)

Click to show or hide information. Name

Type a name for the data type.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the data type.

Click to show or hide information. IsRoot

Select to indicate that the data type can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the data type can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the data type is abstract and that no instances can be created for the class.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Signal Properties dialog box (Signal category)

Click to show or hide information. Name

Type a name for the signal.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the signal.

Click to show or hide information. IsRoot

Select to indicate that the signal can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the signal can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the signal is abstract and that no instances can be created for the signal.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Exception Properties dialog box (Exception category)

Click to show or hide information. Name

Type a name for the exception.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the exception.

Click to show or hide information. IsRoot

Select to indicate that the exception can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the exception can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the exception is abstract and that no instances can be created for the class.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML State Machine Properties dialog box (State Machine category)

Click to show or hide information. Name

Type a name for the state machine.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Activity Model Properties dialog box (Activity Model category)

Click to show or hide information. Name

Type a name for the activity model.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Action State Properties dialog box (Call Action category)

Displays the Call Action category where you can define the call action for an operation.

Click to show or hide information. Mode

Choose whether the operation the call action invokes will be synchronous or asynchronous. Synchronous indicates that the caller waits for the completion of the operation. Asynchronous indicates that the caller continues without waiting for the operation to execute completely.

Click to show or hide information. Operation

Choose the operation you want the call action to invoke.

Click to show or hide information. Arguments

The arguments for the operation you choose under Operation are listed here. Select an argument, and then click Properties to open the following categories where you can edit the property values associated with the argument: Argument, Constraints, and Tagged Values.


UML Datatype Properties dialog box (Enumeration category)

Use this dialog box to define an enumeration data type.

The Enumeration category becomes available when you select Enumeration as the stereotype for a data type (on the Datatype category in the UML Datatype Properties dialog box).

Click to show or hide information. Enumeration Literals

Lists each enumeration and its literal value for the data type.

To quickly edit the enumeration name, click a field under Enumeration and type the name. To quickly edit the literal value, click a field under Literal Value and type the value.

Click to show or hide information. New

Click to create new enumerated literals.

Click to show or hide information. Duplicate

Click to add a new enumeration to the list with the same property values as the selected enumeration.

Click to show or hide information. Delete

Click to delete the selected enumeration from the list.

Click to show or hide information. Move Up/Move Down

After you select an enumeration, click to change the order in which the enumeration is stored. You can only reorder within the same data type.


UML

Expand all contracted text Show All

UML <element> Properties dialog box (Methods category)

Select the Methods category if the implementation of the operation can be overridden by subclasses and methods can be defined by subclasses. Leave unselected if the method realizing the operation is inherited unchanged by all descendants.

Use the Methods category to specify methods that override the implementation of a polymorphic operation.

Click to show or hide information. Has Method

Select if the implementation of the operation has a method that realizes it.

Click to show or hide information. Language

Choose the language you want to write the method in.

Click to show or hide information. Method Body

Type the text of the method (in the selected language).

For example a simple C++ method body could be:

{

if (x == 0)

{

RunCommand();

ProcessResults();

}

}


UML Method Properties dialog box

Click to show or hide information. Class name

The UML solution automatically provides full information about the class name. You can't edit this information.

Click to show or hide information. Operation name

Displays all operations that can have method bodies for this particular class. This includes all operations from the current class, polymorphic operations from base classes, and operations from interfaces that are implemented by the class.

Choose the operation for which you want to specify a method.

Click to show or hide information. Has Method

Select if the operation has a method that realizes it.

Click to show or hide information. Language

Choose the language you want to write the method in.

Click to show or hide information. Method Body

Type the body of the method.

For example a simple C++ method body could be:

{

if (x == 0)

{

RunCommand();

ProcessResults();

}

}


UML Events dialog box

Use the Events category to add, edit, or delete events.

Click to show or hide information. Packages

Click to select the package whose events you want to display.

Click to show or hide information. Events

Lists the events you have defined.

To access all of the settings for an event, select the event, and then click Properties.

  • Event The name of the event.
  • Event Type Indicates the event type that you selected in the New Event Type dialog box.

Click to show or hide information. New

Click to open the New Event Type dialog box, where you can choose an event type.

Click to show or hide information. Duplicate

Click to add a new event to the list with the same property values as the selected event.

Click to show or hide information. Delete

Click to delete the selected event from the list.

Click to show or hide information. Properties

After you select an event, click to display three categories where you can edit the property values associated with the event: a specific event type category (either Call Event, Signal Event, Change Event, or Time Event), Constraints, and Tagged Values.


UML Pseudo State Properties dialog box (Pseudostate category)

Click to show or hide information. Name

Type the name of the pseudostate.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Kind

The UML solution automatically adds the kind of pseudostate that corresponds to the element whose shape or icon you selected.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML

Expand all contracted text Show All

UML <element> Properties dialog box (Specification category)

Click to show or hide information. Specification

Type an expression that describes the effect of performing the operation.


Choose UML Diagram

Expand all contracted text Show All

Choose UML Diagram dialog box

If the first shape you drag onto a drawing page appears on multiple stencils, use the Choose UML Diagram dialog box to choose which type of UML diagram you want to create. The type of UML diagram then appears as a watermark on the workspace.

Click to show or hide information. Diagram type

Choose the type of diagram you want to create, and click Close.


UML Model Properties dialog box (Model category)

Click to show or hide information. Name

Type a name for the model.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the model.

Click to show or hide information. IsRoot

Select to indicate that the model can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the model can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the model is abstract and that no instances can be created for the model.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Stereotypes dialog box

On the UML menu, click Stereotypes, or right-click the system model in the tree view and click Stereotypes to create new stereotypes or to edit or delete existing stereotypes. The stereotypes you create here are included, where appropriate, in the Stereotype lists in the UML Properties dialog boxes associated with UML elements.

Click to show or hide information. Stereotypes

Lists the available stereotypes for models.

To quickly edit the most commonly used settings for a stereotype, click a field in the Stereotypes list, and then select or type a value.

To access all of the settings for a stereotype, select the stereotype in the list, and then click Properties.

  • Stereotype Double-click this field to edit an existing stereotype name. Click New to add a new stereotype.
  • Base Class Choose the name of the UML model element to which the stereotype applies.
  • IsRoot Select to indicate that the stereotype can't have ancestors.
  • IsLeaf Select to indicate that the stereotype can't have descendants.
  • IsAbstract Select to indicate that the stereotype is abstract and that no instances can be created for the class.

Click to show or hide information. New

Click to add an undefined stereotype to the list of stereotypes.

To define the most commonly used settings for a stereotype, click a field in the Stereotypes list, and then select or type a value.

To access all of the settings for a stereotype, select the stereotype in the list, and then click Properties.

Click to show or hide information. Properties

After you select a stereotype in the Stereotypes list, click to display four categories where you can edit the property values associated with the stereotype: Stereotype, Required Tagged Values, Constraints, and Tagged Values.

Click to show or hide information. Duplicate

Click to add a new stereotype to the list with the same property values as the selected stereotype.

Click to show or hide information. Delete

Click to delete the selected stereotype from the list of stereotypes.


UML Stereotype Properties dialog box (Stereotype category)

Click to show or hide information. Name

Type a name for the stereotype.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Base Class

Choose the name of the UML modeling element to which the stereotype applies.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the stereotype.

Click to show or hide information. IsRoot

Select to indicate that the stereotype can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the stereotype can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the stereotype is abstract and that no instances can be created for the class.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Stereotype Properties dialog box (Required Tagged Values category)

Use the Required Tagged Values category to add, edit, or delete required tagged values to stereotypes.

Click to show or hide information. Required Tags

Lists the required tags you have defined.

Click to show or hide information. Required Tagged Values

Lists the values for the selected required tag.

Click to show or hide information. New

Click to display the Tagged Value category where you can add property values to define a new tagged value.

Click to show or hide information. Duplicate

Click to add a new tagged value to the list with the same property values as the selected tagged value.

Click to show or hide information. Delete

Click to delete the selected tagged value from the list. You can only delete tagged values that you created, not predefined tagged values.

Click to show or hide information. Properties

Click to display the Tagged Value category where you can add property values to define a new tagged value.


UML Options dialog box (Add-on tab)

On the UML menu, click Options, and then click the UML Add-on tab to set options for the UML solution that determine default behavior for shapes, packages, object names, and more.

Click to show or hide information. Shape Ctrl-Drag Behavior

Choose the result you get when you hold down the CTRL key and drag a UML shape. The default is Copy object, which means that you duplicate the UML element the shape represents, including all of the element's property values. The duplicate is automatically assigned a new name.

Copy object view creates a view of the element the shape represents (if this is permitted according to the UML specification). You can drag the shape representing the view into another package or diagram in the model.

Click to show or hide information. Create A Diagram Page When A Package Or Subsystem Shape Is Added To A Document

Select to automatically create a Static Structure diagram drawing page each time you add a new package or subsystem to your model. If you clear the option, you must create a new diagram drawing page yourself.

Click to show or hide information. Create Watermark On Drawing Page

Select to have a watermark of the diagram type name appear on the workspace directly above each drawing page.

Click to show or hide information. Prompt For Model Element(s) Delete On Delete Of Shape(s)

Choose the result you get when you delete a UML shape. When this option is selected, each time you delete a shape from a diagram, you are prompted to choose to delete only the shape (the element view) or both the shape and the model element. If this option is not selected, the shape (element view) is deleted from the diagram only.

Click to show or hide information. Delete Connectors When Deleting Shapes

Select to delete the connectors attached to a shape when you delete that shape from the drawing page.

Click to show or hide information. Instantiate A Lollypop Shape

Select to have an interface appear as a lollypop interface shape when it is dropped onto the drawing page from the tree view in the Model Explorer.

Click to show or hide information. Instantiate A Class-like Interface Shape

Select to have an interface appear as a class-like interface shape when it is dropped onto the drawing page from the tree view in the Model Explorer.

Click to show or hide information. Auto Assign Names To Newly Created UML Element

Select to automatically assign names to new UML objects you create. If you clear the option, no names are assigned until you type one in the object's UML Properties dialog box.

Click to show or hide information. Check Semantic Errors On UML Models

Select this option to use semantic error checking for the model. Clear this option to turn semantic error checking off. This option is selected by default.

Click to show or hide information. Set Defaults

Click to set the options currently selected on the UML Add-on tab as the default settings for each new UML Model Diagram file you open.


UML Options dialog box (UML Document tab)

Use these options to choose what data types are available for element properties settings in the UML Properties dialog box.

Click to show or hide information. C# Data Types

Select to make common C# data types available for element properties settings in the UML Properties dialog box.

Click to show or hide information. C++ Data Types

Select to make common C++ data types available for element properties settings in the UML Properties dialog box.

Click to show or hide information. VB Data Types

Select to make common Visual Basic data types available for element properties settings in the UML Properties dialog box.

Click to show or hide information. IDL Data Types

Select to make common IDL data types available for element properties settings in the UML Properties dialog box.

Click to show or hide information. Top Package

Select to make data types for the top package in the system available for element properties settings in the UML Properties dialog box.

Click to show or hide information. User-Defined Packages

Select to make data types from any packages in the system available for element properties settings in the UML Properties dialog box.

Click to show or hide information. List Data Types With Package Name

Select to have the package name appear before each data type in the list of available data types for element properties settings in the UML Properties dialog box.

Click to show or hide information. Relax semantic error checking

Clear this default setting to apply additional rules for semantic error checking that is in full compliance with the UML 1.2 specification.

Note In the UML Options dialog box, this option is set by default.


Delete Shape message box

Use the Delete Shape message box to choose whether you want to delete a view of an element or the element view, the model element, and all of its views.

If the option Prompt for model element(s) delete on delete of shape(s) is selected in the UML Options dialog box (UML Add-on tab), the Delete Shape message box appears.

  • Click Yes to delete only the current view of the element and keep the element in the UML model.
  • Click No to delete the current view of the element, the element in the model, and all of its other views.


UML Diagram dialog box (Diagrams)

Use the UML Diagram dialog box to create a new UML model diagram or navigate to an existing diagram in which the shape appears.

Click to show or hide information. Select Diagram

Lists the existing UML diagrams in which the selected shape appears. Select a diagram from the list, and then click OK to display the drawing page on which the diagram is located.

Click to show or hide information. New

Opens the Insert UML Diagram dialog box, where you can create a new UML diagram. The diagram you create is added to the Select Diagram list.


Insert UML Diagram dialog box

Use the Insert UML Diagram dialog box to add a new diagram to a UML model.

Click to show or hide information. Name

Type a name for the new diagram you're creating.

Click to show or hide information. Diagram Type

Choose the type of diagram you want to create. The diagram types listed are appropriate for the shape in the context of the diagram you're creating.


UML Diagram dialog box (Views)

Right-click a shape in a diagram or an icon in the tree view that represents a UML element associated with a static structure, use case, component, or deployment diagram, and then click Views.

Use the UML Diagram dialog box to navigate to an existing diagram in which the element appears.

Click to show or hide information. Select Diagram

Lists the existing UML diagrams in which the selected element appears. Select a diagram from the list, and then click OK to display the drawing page on which the diagram is located.


UML Class Properties dialog box (Class category)

Click to show or hide information. Name

Type a name for the class. Classes in the same package must have unique names.

Click to show or hide information. Full path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Visibility

Choose the type of visibility, public, private, or protected, that applies to the class.

Click to show or hide information. IsRoot

Select to indicate that the class can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the class can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the class is abstract and that no instances can be created for the class.

Click to show or hide information. IsActive

Select to specify that an object of the class maintains its own thread of control.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML

Expand all contracted text Show All

UML <element> Properties dialog box (Attributes category)

Use the Attributes category to add, edit, or delete attributes.

Click to show or hide information. Attributes

Lists the attributes you have defined for the class.

To quickly edit the most commonly used settings for an attribute, click a field in the Attributes list, and then select or type a value.

To access all of the settings for an attribute, select the attribute in the Attributes list, and then click Properties.

  • Attribute Type or edit an identifier string as a name for the attribute. Typically, attribute names begin with a small letter, for example, maximum-size or color.
  • Type Choose an implementation type for the attribute. If the data type you want isn't listed, right-click a data types package in the tree view, point to New, and then click Datatype, or create a new class.
  • Visibility Choose the visibility (public, private, or protected) that applies to the attribute. Public means the attribute is publicly available to any class. Protected means the attribute is available inside the class and to its subclasses. Private means that the attribute can only be used inside the class.
  • Multiplicity Choose the possible number of data values that can be held by an instance. If the multiplicity is 1, then the attribute holds exactly one value.
  • Init. Value Type the value of the attribute upon initialization. Click a different tab at the bottom of the list to view or set inherited attributes.

Click to show or hide information. New

Click to add an undefined attribute to the list of attributes.

To quickly edit the most commonly used settings for an attribute, click a field in the Attributes list, and then select or type a value.

To access all of the settings for an attribute, select the attribute in the Attributes list, and then click Properties.

Click to show or hide information. Duplicate

Click to add a new attribute to the list with the same property values as the selected attribute.

Click to show or hide information. Delete

Click to delete the selected attribute from the list.

Click to show or hide information. Move Up/Move Down

After you select an attribute under Attributes, click to change the order in which the attribute is stored. You can only reorder within the same classifier.

Click to show or hide information. Properties

After you select an attribute, click to display three categories where you can edit the property values associated with the attribute: Attribute, Constraints, and Tagged Values.


UML Attribute Properties dialog box (Attribute category)

Click to show or hide information. Name

Type or edit an identifier string as a name for the attribute. Typically, attribute names begin with a small letter, for example, maximum-size or color.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Prefix

Type any language-specific annotation text here you want to use to further identify an attribute.

Click to show or hide information. Suffix

Type any language-specific annotation text here you want to use to further identify an attribute.

Click to show or hide information. Type

Choose an implementation type for the attribute. If the data type you want isn't listed, right-click a data types package in the tree view in the Model Explorer, point to New and then choose DataType, or create a new class.

Click to show or hide information. Expression

Displays the result of data you've added under Prefix, Type, and Suffix.

Click to show or hide information. Visibility

Choose the visibility (public, private, or protected) that applies to the attribute. Public means the attribute is publicly available to any class. Protected means the attribute is available inside the class and to its subclasses. Private means that the attribute can only be used inside the class.

Click to show or hide information. Multiplicity

Choose the possible number of data values that can be held by an instance. If the multiplicity is 1, then the attribute holds exactly one value.

Click to show or hide information. InitialValue

Type the value of the attribute upon initialization.

Click to show or hide information. Changeable

Changeable indicates whether the attribute value can be modified after the element is created. None means no restrictions on modification. Frozen means the value can't be altered after the element and its values are instantiated. AddOnly is meaningful only when the multiplicity is not fixed to a single value. It means that additional values can be added but, once added, cannot be removed or altered.

Click to show or hide information. OwnerScope

Choose Instance if each object created by the class has its own value of the attribute. Choose Classifier for owner scope if the attribute value is owned by the class itself. A classifier-scope attribute is underlined.

Click to show or hide information. TargetScope

Choose Instance if the attribute value is an instance of its data type. Choose Classifier for target scope if the attribute value is the type itself.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML

Expand all contracted text Show All

UML <element> Properties dialog box (Operations category)

Use the Operations category to add, edit, or delete operations.

Click to show or hide information. Operations

Lists the operations you have defined for the class.

To quickly edit the most commonly used settings for an operation, click a field in the Operations list, and then select or type a value.

To access all of the settings for an operation, select the operation in the Operations list, and then click Properties.

  • Operation Type or edit an identifier string as a name for the operation. Typically, operation names begin with a small letter, for example, display (): Location.
  • Return Type Choose an implementation type for the value returned by the operation. If the data type you want isn't listed, right-click a data types package in the tree view, point to New, then click DataType, or create a new class.
  • Visibility Choose the visibility (public, private, or protected) that applies to the operation. Public means the operation is publicly available to any class. Protected means the operation is available inside the class and to its subclasses. Private means that the operation can only be used inside the class.
  • Polymorphic Select if the implementation of the operation can be overridden by subclasses and methods can be defined by subclasses. Leave unselected if the method realizing the operation is inherited unchanged by all descendants.
  • Scope Choose instance if the operation is only applicable to objects created using the class. Choose classifier if the operation can be applied to the class itself.

Click to show or hide information. New

Click to add an undefined operation to the list of operations.

To quickly edit the most commonly used settings for an operation, click a field in the Operations list, and then select or type a value.

To access all of the settings for an operation, select the operation in the Operations list, and then click Properties.

Click to show or hide information. Duplicate

Click to add a new operation to the list with the same property values as the selected operation.

Click to show or hide information. Delete

Click to delete the selected operation from the list.

Click to show or hide information. Move Up/Move Down

After you select an operation under Operations, click to change the order in which the operation is stored. You can only reorder within the same classifier.

Click to show or hide information. Properties

After you select an operation under Operations, click to display categories where you can edit the property values associated with the operation: Operations, Details, Parameters, Exceptions, Constraints, and Tagged Values.

Click to show or hide information. Methods

Click to display the UML Methods Properties dialog box, where you can specify method bodies for overridden polymorphic operations and for operations of interfaces implemented by the class.


UML Operation Properties dialog box (Operation category)

Click to show or hide information. Name

Type or edit an identifier string as a name for the operation. Typically, operation names begin with a small letter, for example, display (): Location.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Prefix

Type any language-specific annotation text here you want to use to further identify an operation return type.

Click to show or hide information. Suffix

Type any language-specific annotation text here you want to use to further identify an operation return type.

Click to show or hide information. Return Type

Choose an implementation type for the value returned by the operation. If the data type you want isn't listed, right-click a data types package in the tree view, point to New and click Data Type, or create a new class.

Click to show or hide information. Expression

Displays the result of data you've added under Prefix, Return Type, and Suffix.

Click to show or hide information. Visibility

Choose the visibility (public, private, or protected) that applies to the operation. Public means the operation is publicly available to any class. Protected means the operation is available inside the class and to its subclasses. Private means that the operation can only be used inside the class.

Click to show or hide information. OwnerScope

Choose instance for owner scope if the operation is only applicable to objects created using the class. Choose classifier if the operation can be applied to the class itself.

Click to show or hide information. IsPolymorphic

Select if the implementation of the operation can be overridden by subclasses and methods can be defined by subclasses. Leave clear if the method realizing the operation is inherited unchanged by all descendants.

Click to show or hide information. IsQuery

Select when an application of the operation will not modify the state of its element.

Click to show or hide information. Call Concurrency

Concurrency specifies the semantics of concurrent calls to the same passive instance (i.e., an instance originating from a classifier with IsActive=false). Sequential means only one call to an instance can be outstanding at once. Guarded means that multiple calls from concurrent threads can occur simultaneously but only one can commence, with the others blocked until the first operation is complete. Concurrent means that multiple calls from concurrent threads can occur simultaneously and all can proceed concurrently.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Class Properties dialog box (Receptions category)

Use the Receptions category to add, edit, or delete receptions.

Click to show or hide information. Receptions

Lists the receptions you have defined for the classifier.

To quickly edit the most commonly used settings for a reception, click a field in the Receptions list, and then select or type a value.

To access all of the settings for a reception, select the reception in the Receptions list, and then click Properties.

  • Reception Type a name for the reception.
  • Signal Choose the signal that the classifier is prepared to handle.
  • Visibility Choose the visibility (public, private, or protected) that applies to the reception. Public means the operation is publicly available to any class. Protected means the operation is available inside the class and to its subclasses. Private means that the operation can only be used inside the class.
  • Polymorphic Select if the response to the signal depends on the state of the classifier and can be overridden on subclasses. Leave unselected if the response to the signal is always the same.
  • Scope Choose instance if the reception is applicable to each object created by the classifier. Choose classifier if the reception is applicable only to the classifier itself.

Click to show or hide information. New

Click to add an undefined reception to the list of receptions for the classifier.

To quickly edit the most commonly used settings for a reception, click a field in the Receptions list, and then select or type a value.

To access all of the settings for a reception, select the reception, and then click Properties.

Click to show or hide information. Duplicate

Click to add a new reception to the list with the same property values as the selected reception.

Click to show or hide information. Delete

Click to delete the selected reception from the list.

Click to show or hide information. Move Up/Move Down

After you select a reception, click to change the order in which the reception is stored. You can only reorder within the same classifier.

Click to show or hide information. Properties

After you select a reception, click to display categories where you can edit the property values associated with the reception: Reception, Exceptions, Constraints, and Tagged Values.


UML Reception Properties dialog box (Reception category)

Click to show or hide information. Name

Type a name for the reception.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Signal

Choose the signal that the classifier is prepared to handle.

Click to show or hide information. Visibility

Choose the visibility (public, private, or protected) that applies to the reception. Public means the operation is publicly available to any class. Protected means the operation is available inside the class and to its subclasses. Private means that the operation can only be used inside the class.

Click to show or hide information. IsPolymorphic

Select if the response to the signal depends on the state of the classifier and can be overridden on subclasses. Leave unselected if the response to the signal is always the same.

Click to show or hide information. OwnerScope

Choose instance if the reception is applicable to each object created by the classifier. Choose classifier if the reception is applicable only to the classifier itself.

Click to show or hide information. Specification

Type an expression that describes the effects on the classifier receiving the signal.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML

Expand all contracted text Show All

UML <element> Properties dialog box (Parameters category)

Use the Parameters category to add, edit, or delete parameters.

Click to show or hide information. Parameters

Lists the parameters you have already defined.

To quickly edit the most commonly used settings for a parameter, click a field in the Parameters list, and then select or type a value.

To access all of the settings for a parameter, select the parameter in the Parameters list, and then click Properties.

  • Parameter Type or edit an identifier string as a name for the parameter. The name must be unique within the parameter list that contains it.
  • Type Choose an implementation type for the value returned by the parameter. If the data type you want isn't listed, right-click a data types package in the tree view, choose New, and then choose DataType, or create a new class.
  • Kind Choose the kind of parameter required.
  • In means an input parameter that cannot be modified.
  • Out means an output parameter that can be modified to communicate information to the caller.
  • Inout means an input parameter that can be modified.
  • Default Value Type an expression whose evaluation yields a value to be used when no argument is supplied for the parameter.

Click to show or hide information. New

Click to add an undefined parameter to the list parameters.

To quickly edit the most commonly used settings for a parameter, click a field in the Parameters list, and then select or type a value.

To access all of the settings for a parameter, select the parameter in the Parameters list, and then click Properties.

Click to show or hide information. Duplicate

Click to add a new parameter to the list with the same property values as the selected parameter.

Click to show or hide information. Delete

Click to delete the selected parameter.

Click to show or hide information. Move Up/Move Down

After you select a parameter, click to change the order in which the parameter is stored.

Click to show or hide information. Properties

After you select a parameter, click to display the Parameter Properties dialog box where you can edit the property values associated with the parameter.


UML Parameter Properties dialog box (Parameter category)

Click to show or hide information. Name

Type or edit an identifier string as a name for the parameters. The name must be unique within the parameter list that contains it.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Prefix

Type any language-specific annotation text here you want to use to further identify a parameter.

Click to show or hide information. Suffix

Type any language-specific annotation text here you want to use to further identify a parameter.

Click to show or hide information. Type

Choose an implementation type for the value returned by the parameter. If the data type you want isn't listed, right-click a data types package in the tree view, point to New and click DataType, or create a new class.

Click to show or hide information. Expression

Displays the result of data you've added under Prefix, Return Type, and Suffix.

Click to show or hide information. Kind

Choose the kind of parameter required.

  • In means an input parameter that cannot be modified.
  • Out means an output parameter that can be modified to communicate information to the caller.
  • Inout means an input parameter that can be modified.

Click to show or hide information. Default Value

Type an expression whose evaluation yields a value to be used when no argument is supplied for the parameter.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Class Properties dialog box (Template Parameters category)

Use the Template Parameters dialog box to add, edit, or delete template parameters.

Click to show or hide information. Template Parameters

Lists the parameters you have defined for the class.

  • Template Parameter To edit the template parameter name, click a field in the column, and then type the new name.
  • Type To edit the template parameter type, click a field in the column, and then select the type.

Click to show or hide information. New

Click to add a template parameter to the list.

Click to show or hide information. Duplicate

Click to add a new parameter to the list with the same property values as the selected parameter.

Click to show or hide information. Delete

Click to delete the selected parameter from the list.

Click to show or hide information. Move Up/Move Down

After you select a parameter, click to change the order in which the parameter is stored. You can only reorder within the same classifier.


UML

Expand all contracted text Show All

UML <element> Properties dialog box (Exceptions category)

Use the Exceptions category to select exceptions generated by an operation or reception.

Click to show or hide information. Choose The Exceptions Which Can Be Generated

Lists the exceptions you have added to a model by dropping an Exception shape for each exception onto the drawing page. Click an exception name to select it. To select multiple exceptions, press CTRL, and then click exception names.


UML

Expand all contracted text Show All

UML <element> Properties dialog box (Constraints category)

Use the Constraints category to add, edit, or delete constraints.

Click to show or hide information. Constraints

Lists the constraints you have defined.

To quickly edit the most commonly used settings for a constraint, click a field in the Constraints list, and then select or type a value.

To access all of the settings for a constraint, select the constraint in the Constraints list, and then click Properties.

  • Constraint Type or edit a name for the constraint.
  • Stereotype Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by choosing UML then clicking Stereotypes.
  • Language Choose the language you want to write the constraint in.

Click to show or hide information. New

Click to add an undefined constraint to the list of constraints.

To quickly edit the most commonly used settings for a constraint, click a field in the Constraints list, and then select or type a value.

To access all of the settings for a constraint, select the constraint in the Constraints list, and then click Properties.

Click to show or hide information. Duplicate

Click to add a new constraint to the list with the same property values as the selected constraint.

Click to show or hide information. Delete

Click to delete the selected constraint form the list.

Click to show or hide information. Properties

After you select a constraint under Constraints, click to display two categories where you can edit the property values associated with the constraint: Constraint and Tagged Values.

Click to show or hide information. Constraint Body

Using natural language or a predefined constraint language, write a Boolean expression that must be true when evaluated for a system, otherwise the system is invalid.


UML Constraint Properties dialog box (Constraint category)

Click to show or hide information. Name

Type or edit a name for the constraint.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Body

Using natural language or a predefined constraint language, write a Boolean expression that must be true when evaluated for a system, otherwise the system is invalid.

Click to show or hide information. Language

Choose the language you want to write the constraint in.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML

Expand all contracted text Show All

UML <element> Properties dialog box (Tagged Values category)

Use the Tagged Values category to add, edit, or delete tagged values.

Click to show or hide information. Tag

Lists the tagged values you have defined. If you're editing or duplicating an existing tagged value, the name will already be listed.

Click to show or hide information. Value

Type a value for the tag that is expressible as a string.

Click to show or hide information. New

Click to add an undefined tagged value to the list of tagged values.

Click to show or hide information. Duplicate

Click to add a new tagged value to the list with the same property values as the selected tagged value.

Click to show or hide information. Delete

Click to delete the selected tagged value from the list.

Click to show or hide information. Properties

After you select a tagged value, click to display the Tagged Value dialog box, where you can edit the property values associated with the tagged value.


UML Tagged Values Properties dialog box (Tagged Value category)

Click to show or hide information. Tag

Type a name for the tagged value. A tagged value name must be unique for a given UML element.

Click to show or hide information. Value

Type a value for the tag that is expressible as a string.


UML Subsystem Properties dialog box (Subsystem category)

Click to show or hide information. Name

Type a name for the subsystem.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the subsystem.

Click to show or hide information. IsRoot

Select to indicate that the subsystem can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the subsystem can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the subsystem is abstract and that no instances can be created for the subsystem.

Click to show or hide information. IsInstantiable

Select if the instances of the model elements within the subsystem form an implicit composition that can be treated as a subsystem instance.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Package Properties dialog box (Package category)

Click to show or hide information. Name

Type a name for the package.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the package.

Click to show or hide information. IsRoot

Select to indicate that the package can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the package can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the package is abstract and that no instances can be created for the class.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML

Expand all contracted text Show All

UML <element> Properties dialog box (Events category)

Use the Events category to add, edit, or delete events.

Click to show or hide information. Events

Lists the events you have defined.

To access all of the settings for an event, select the event, and then click Properties.

  • Event The name of the event.
  • Event Type Indicates the event type that you selected in the New Event Type dialog box.

Click to show or hide information. New

Click to open the New Event Type dialog box, where you can choose an event type.

Click to show or hide information. Duplicate

Click to add a new event to the list with the same property values as the selected event.

Click to show or hide information. Delete

Click to delete the selected event from the list.

Click to show or hide information. Properties

After you select an event, click to display three categories where you can edit the property values associated with the event: a specific event type category (either Call Event, Signal Event, Change Event, or Time Event), Constraints, and Tagged Values.


New Event Type dialog box

Use the New Event Type dialog box to choose the type of event you want to create.

Click to show or hide information. Event Type

Choose the type of event you want.

  • Call Event Occurs when an element receives a call for an operation. When you choose this option, and then click OK, three categories appear where you can set property values for the event: Call Event, Constraints, and Tagged Values.
  • Signal Event Occurs when an element receives an explicit signal from another element. When you choose this option, and then click OK, three categories appear where you can set property values for the event: Signal Event, Constraints, and Tagged Values.
  • Change Event Occurs when a designated condition (usually described as a Boolean operation) becomes true. When you choose this option, and then click OK, three categories appear where you can set property values for the event: Change Event, Constraints, and Tagged Values.
  • Time Event Occurs after a designated period of time or at a specific time or date. When you choose this option, and then click OK, three categories appear where you can set property values for the event: Time Event, Constraints, and Tagged Values.


UML Call Event Properties dialog box (Call Event category)

Click to show or hide information. Name

Type a name for the call event.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Operation

Choose the operation the event calls for.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Signal Event Properties dialog box (Signal Event category)

Click to show or hide information. Name

Type a name for the signal event.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Signal

Choose the signal to which the event is related. All signals defined for the relevant package are listed here.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Change Event Properties dialog box (Change Event category)

Click to show or hide information. Name

Type a name for the change event.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Language

Choose the language in which you want to write the change expression.

Click to show or hide information. ChangeExpression

Write the change expression, using the language you specified. A change expression consists of a Boolean condition. The event occurs when the value of the expression changes from FALSE to TRUE.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Time Event Properties dialog box (Time Event category)

Click to show or hide information. Name

Type a name for the time event.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Language

Choose the language in which you want to describe the duration for the time event.

Click to show or hide information. Duration

Write an expression, using the language you specified above, that indicates a period of time after which or a specific date or time on which the event will occur.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Interface Properties dialog box (Interface category)

Click to show or hide information. Name

Type a name for the interface.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the interface.

Click to show or hide information. IsRoot

Select to indicate that the interface can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the interface can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the interface is abstract and that no instances can be created for the interface.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Object Properties dialog box (Object category)

Click to show or hide information. Name

Type a name for the object.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Class

Choose the class the of which the object is an instance.

Click to show or hide information. New

Click to create a new class you can associate with the current object.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Object Properties dialog box (Attribute Values category)

Use the Attribute Values category to edit an attribute associated with the class of which the object is an instance.

Click to show or hide information. Attribute Values

Lists the attributes associated with the class of which the object is an instance.

To quickly edit the most commonly used settings for an attribute, click a field in the Attributes list, and then select or type a value.

To access all of the settings for an attribute, select the attribute in the Attribute Values list, and then click Properties.

Click to show or hide information. Properties

After you select an attribute, click to display three categories where you can add property values to define an attribute link: Attribute Link, Constraints, and Tagged Values.


UML Attribute Link Properties dialog box (Attribute Link category)

Click to show or hide information. Name

The name of the attribute link is the same as the name of the attribute from the class of which the object is an instance. The UML solution automatically provides the name and you cannot change it.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Type

Displays the type of attribute link. The UML solution automatically provides the name and you cannot change it.

Click to show or hide information. Value

Type a value expression for the attribute link. The value is not interpreted and can be used to represent one or more values for an attribute.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Generalization Properties dialog box (Generalization category)

Click to show or hide information. Name

Type a name for the generalization.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Discriminator

Type the name of the partition of the more general class to which the more specific class belongs. You can leave the discriminator label empty, which is a valid (default) value.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Dependency Properties dialog box (Dependency category)

Click to show or hide information. Name

Type a name for the dependency.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Description

Type a text description of the dependency.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Link Properties dialog box (Link category)

Click to show or hide information. Name

Type a name for the link.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Association

Choose the association of which the link is an instance.

Click to show or hide information. LinkEnd Count

You can't change the end count for a link. For an n-ary link, choose the number of link ends you want.

Click to show or hide information. LinkEnds

Lists the link ends for the link.

To quickly edit the most commonly used settings for a link end, click a field in the LinkEnds list, and then select or type a value.

To access all of the settings for a link end, select the link end in the list, and then click Properties.

  • LinkEnd Type the name of the link end.
  • Stereotype Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking UML then clicking Stereotypes.

Click to show or hide information. Properties

After you select a link end, click to display three categories where you can add property values to define a link end: Link End, Constraints, and Tagged Values.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Link End Properties dialog box (Link End category)

Click to show or hide information. Name

Type a name for the link end.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Trace Properties dialog box (Trace category)

Click to show or hide information. Name

Type a name for the trace.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Description

Type a text description of the trace.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Refinement Properties dialog box (Refinement category)

Click to show or hide information. Name

Type a name for the refinement.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Description

Type a text description of the refinement.

Click to show or hide information. Mapping

Type a string that describes the mapping between the two elements the refinement relates.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Usage Properties dialog box (Usage category)

Click to show or hide information. Name

Type a name for the usage.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Description

Type a text description of the usage.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Binding Properties dialog box (Binding category)

Click to show or hide information. Name

Type a name for the binding.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Description

Type a text description of the binding.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Binding Properties dialog box (Bound Arguments category)

Use the Bound Arguments category to edit existing arguments.

Click to show or hide information. Bound Arguments

Lists arguments that correspond to the parameters of the template with which another model element has a binding relationship.

Click to show or hide information. Properties

After you select an argument under Formal Arguments, click to display a category where you bind a type to a template parameter with an unspecified type or bind a value to a template parameter of a specific type: Bound Argument.


UML Bound Argument Properties dialog box (Bound Argument category)

Click to show or hide information. Name

The UML solution supplies the name of the argument associated with particular template parameters. You can't change the name.

Click to show or hide information. Type

If the template parameter associated with the argument has an unspecified type, bind a type to the parameter by specifying the type here. If the data type you want isn't listed, right-click a data types package in the tree view, point to New and click DataType, or create a new class.

Click to show or hide information. Value

If the template parameter associated with the argument has a specific type, bind a value to the parameter by typing a value here.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Comment Properties dialog box (Comment category)

Click to show or hide information. Name

Type a name for the note.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Association Class Properties dialog box (Association Class category)

Use the Association Class category to select the association end for which you want to edit adornments.

Click to show or hide information. Name

Type a name for the association class.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. End Count

An association class has only two ends so you cannot change the end count here. For an n-ary association class, choose the number of ends you want.

Click to show or hide information. Association Ends

Lists the association ends.

To quickly edit the most commonly used settings for an association end, click a field in the Association Ends list, and then select or type a value.

To access all of the settings for an association end, select the association end in the list, and then click Properties.

  • End Name Type an end name for the association end. The name indicates the role played by the class attached to the end.
  • Aggregation Choose the aggregation you want. Only one association end can be an aggregation.
  • None means that the end is not an aggregate.
  • Shared means that the end is an aggregate and that the other end is a part and must have the aggregation value of none. The part can be contained in other aggregates. Choosing this option adds a hollow diamond to the end.
  • Composite means the end is a composite and that the other end is a part and must have an aggregation value of none. The part can't be part of any other composite. Choosing this option adds a filled diamond to the end.
  • Visibility Choose the type of visibility (public, private, or protected) that applies to the association end.
  • Multiplicity Choose an option to specify the number of target instances that can be associated with a single source instance across the association.
  • IsNavigable Select to indicate that navigation is supported toward the target instance. Selecting this option adds an arrow to the association end. Clear it to indicate that navigation is not supported. To decrease complexity in diagrams, navigability is often shown only in exceptional situations.

Click to show or hide information. Properties

After you select an end under Association Ends, click to display the UML Association End Properties dialog box, which includes four categories that you can use to add property values to define an association end: Association End, Qualifier Attributes, Constraints, and Tagged Values.


UML Association End Properties dialog box (Association End category)

Click to show or hide information. Name

Type an end name for the association end. The name indicates the role played by the class attached to the end. End name is optional.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Changeable

Choose the extent to which an instance of the association can be modified from the source end.

  • None means there are no restrictions on modification.
  • Frozen means no links can be added after creation of the source object.
  • AddOnly means that links can be added at any time from the source object but can't removed before at least one participating object is destroyed.

Click to show or hide information. Aggregation

Choose the aggregation you want. Only one association end can be an aggregation.

  • None means that the end is not an aggregate.
  • Shared means that the end is an aggregate and that the other end is a part and must have the aggregation value of none. The part can be contained in other aggregates. Choosing this option adds a hollow diamond to the end.
  • Composite means the end is a composite and that the other end is a part and must have an aggregation value of none. The part can't be part of any other composite. Choosing this option adds a filled diamond to the end.

Click to show or hide information. TargetScope

Choose whether the targets are instances or classifiers.

  • Instance means that each line of the association contains a reference to an instance of the target classifier.
  • Classifier means that each link of the association contains a reference to the target classifier itself.

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the association end.

Click to show or hide information. IsNavigable

Select to indicate that navigation is supported toward the target instance. Selecting this option adds an arrow to the association end. Clear it to indicate that navigation is not supported. To decrease complexity in diagrams, navigability is often shown only in exceptional situations.

Click to show or hide information. Multiplicity

Choose an option to specify the number of target instances that can be associated with a single source instance across the association.

Click to show or hide information. IsOrdered

If the multiplicity is greater than one, the set of related elements can be ordered or unordered. Leave clear to indicate that the elements are unordered or form a set. Select to indicate that the elements are ordered into a list.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML

Expand all contracted text Show All

UML <element> Properties dialog box (Qualifier Attributes category)

Use the Qualifier Attributes category to create new qualifier attributes, or edit or duplicate existing ones.

Click to show or hide information. Qualifier Attributes

Lists the existing qualifier attributes.

To quickly edit the most commonly used settings for an attribute, click a field in the Qualifier Attributes list, and then select or type a value.

To access all of the settings for an attribute, select the attribute in the list, and then click Properties.

  • Attribute Type or edit an identifier string as a name for the attribute. Typically, attribute names begin with a small letter, for example, maximum-size or color.
  • Type Choose an implementation type for the attribute. If the data type you want isn't listed, right-click a data types package in the tree view, point to New and then click Datatype, or create a new class.
  • Visibility Choose the visibility (public, private, or protected) that applies to the attribute. Public means the attribute is publicly available to any class. Protected means the attribute is available inside the class and to its subclasses. Private means that the attribute can only be used inside the class.
  • Multiplicity Choose the possible number of data values that can be held by an instance. If the multiplicity is 1, then the attribute holds exactly one value.
  • Init. Value Type the value of the attribute upon initialization. Click a different tab at the bottom of the list to view or set inherited attributes.

Click to show or hide information. New

Click to add an undefined attribute to the list of qualifier attributes.

To quickly edit the most commonly used settings for an attribute, click a field in the Qualifier Attributes list, and then select or type a value.

To access all of the settings for an attribute, select the attribute in the list, and then click Properties.

Click to show or hide information. Duplicate

Click to add a new attribute to the list with the same property values as the selected attribute.

Click to show or hide information. Delete

Click to delete the selected attribute from the list.

Click to show or hide information. Move Up/Move Down

After you select a qualifier attribute, click to change the order in which the attribute is stored. You can only reorder within the same classifier.

Click to show or hide information. Properties

After you select a qualifier attribute, click to display three categories that you can use to add property values to define a qualifier attribute: Attribute, Constraints, and Tagged Values.


UML Association Properties dialog box (Association category)

Use the Association category to select the association end for which you want to edit adornments.

Click to show or hide information. Name

Type a name for the association.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Name Reading Direction

Choose a reading direction (forward or backward) or choose none specified.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. End Count

A binary association has only two ends so you cannot change the end count here. For an n-ary association, choose the number of association ends you want.

Click to show or hide information. Association Ends

Lists the association ends.

To quickly edit the most commonly used settings for an association end, click a field in the Association Ends list, and then select or type a value.

To access all of the settings for an association end, select the association end in the list, and then click Properties.

  • End Name Type an end name for the association end. The name indicates the role played by the class attached to the end.
  • Aggregation Choose the aggregation you want. Only one association end can be an aggregation.
  • None means that the end is not an aggregate.
  • Shared means that the end is an aggregate and that the other end is a part and must have the aggregation value of none. The part can be contained in other aggregates. Choosing this option adds a hollow diamond to the end.
  • Composite means the end is a composite and that the other end is a part and must have an aggregation value of none. The part can't be part of any other composite. Choosing this option adds a filled diamond to the end.
  • Visibility Choose the type of visibility (public, private, or protected) that applies to the association end.
  • Multiplicity Choose an option to specify the number of target instances that can be associated with a single source instance across the association.
  • IsNavigable Select to indicate that navigation is supported toward the target instance. Selecting this option adds an arrow to the association end. Clear it to indicate that navigation is not supported. To decrease complexity in diagrams, navigability is often shown only in exceptional situations.

Click to show or hide information. Properties

After you select an end, click to display the UML Association End Properties dialog box, which includes four categories you can use to add property values to define an association end: Association End, Qualifier Attributes, Constraints, and Tagged Values.


UML Use Case Properties dialog box (Use Case category)

Click to show or hide information. Name

Type a name for the use case.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the use case.

Click to show or hide information. IsRoot

Select to indicate that the use case can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the use case can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the use case is abstract and that no instances can be created for the use case.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Use Case Properties dialog box (Extension Points category)

Use the Extension Points category to add new extension points, or edit or duplicate existing extension points.

Click to show or hide information. Extension Points

Lists existing extension points.

Click to show or hide information. New

Click to display an edit field where you can add property values to define a new extension point for the use case.

Click to show or hide information. Duplicate

Click to add a new extension point to the list with the same property values as the selected extension point.

Click to show or hide information. Delete

Click to delete the selected extension point from the list.


UML Actor Properties dialog box (Actor category)

Click to show or hide information. Name

Type a name for the actor.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the actor.

Click to show or hide information. IsRoot

Select to indicate that the actor can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the actor can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the actor is abstract and that no instances can be created for the actor.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Component Properties dialog box (Component category)

Click to show or hide information. Name

Type a name for the component.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the component.

Click to show or hide information. IsRoot

Select to indicate that the component can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the component can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the component is abstract and that no instances can be created for the actor.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Component Properties dialog box (Nodes category)

Click to show or hide information. Choose the nodes which deploy this component

Lists the nodes in your model. Click a node to select it.

Click to show or hide information. Select All

Click to select all the nodes in the list.

Click to show or hide information. Deselect All

Click to deselect all the nodes in the list.


UML Component Properties dialog box (Classes category)

Click to show or hide information. Choose the classes which are implemented in this component

Lists the classes in your model. Choose the classes this component implements. Click a class to select it.

Click to show or hide information. Select All

Click to select all the classes in the list.

Click to show or hide information. Deselect All

Click to deselect all the classes in the list.


UML Node Properties dialog box (Node category)

Click to show or hide information. Name

Type a name for the node that represents the node type, for example, AdminServer.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the node.

Click to show or hide information. IsRoot

Select to indicate that the node can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the node can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the node is abstract and that no instances can be created for the node.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML

Expand all contracted text Show All

UML <element> Properties dialog box (ClassifierRole category)

Click to show or hide information. Object

Type a name for the classifier role, multi-object, or object lifeline.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Full path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Classifier

If the classifier role, multi-object, or object lifeline is a projection of a classifier, choose the classifier here. On an Object Lifeline or Classifier Role shape, the classifier you choose here can change the appearance of the object.

Click to show or hide information. Multiplicity

Choose the number of instances playing this role in the collaboration or sequence diagram. For a multi-object, the multiplicity is set by default at 1..*.

Click to show or hide information. New

Click to open the Class Properties dialog box and create a new class.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Association Role Properties dialog box (Association Role category)

Click to show or hide information. Name

Type a name for the association role.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Full Path

The UML solution automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Click to show or hide information. Base Association

If the association role is a projection of an association, choose the association here.

Click to show or hide information. Association End Roles

Lists the end roles based on the association of which the association role is a projection.

To access all of the settings for a association end role, select the end role in the list, and then click Properties.

  • AssociationEndRole Type a name for this association end role.
  • Stereotype Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking UML, then clicking Stereotypes.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.

Click to show or hide information. Properties

After you select an end, click to display the UML Association End Role Properties dialog box, which includes four categories you can use to add property values to define an association end: Association End Role, Constraints, and Tagged Values.


UML Association End Role Properties dialog box (Association End Role category)

Click to show or hide information. Name

Type a name for the association end role.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Association Role Properties dialog box (Messages category)

Use the Messages category to add or delete messages or edit existing ones.

Click to show or hide information. Messages

Lists the messages you have defined for the association role.

To quickly edit the most commonly used settings for a message, click a field in the Messages list, and then select or type a value.

To access all of the settings for a message, select the message in the list, and then click Properties.

  • Message The message name you type depends on how the resulting event is implemented. If an event is implemented with an operation call, type the name of the event raised in the target. If an event was implemented as a procedure call, type the name of the operation.
  • Direction Choose a direction so that the message arrow points toward the target object.
  • Flow Kind Choose the kind of message flow you want. The arrowhead varies with the type you choose.
  • Procedure call is a nested flow of control in which the entire nested sequence is completed before the outer level sequence resumes.
  • Flat means a flat flow of control in which the arrow shows the progression to the next step in sequence. Messages are usually asynchronous.
  • Asynchronous indicates an explicitly asynchronous message between two objects in a procedural sequence.
  • Sequence Expression Type a sequence expression for a message. In sequence diagrams, you can omit sequence numbers. In collaboration diagrams, message sequence numbers are usually nested to indicate levels. For example, message 3.1.4 follows message 3.1.3 within activation 3.1.

Click to show or hide information. New

Click to add an undefined message to the list of messages.

To quickly edit the most commonly used settings for a message, click a field in the Messages list, and then select or type a value.

To access all of the settings for a message, select the message in the list, and then click Properties.

Click to show or hide information. Duplicate

Click to add a new message to the list with the same property values as the selected message.

Click to show or hide information. Delete

Click to delete the selected message from the list.

Click to show or hide information. Move Up/Move Down

After you select a message under Messages, click to move the message higher in the list order.

Click to show or hide information. Properties

After you select a message, click to display three categories where you can edit the property values associated with the message: Message, Constraints, and Tagged Values.


UML Message Properties dialog box (Message category)

Click to show or hide information. Name

The message name you type depends on how the resulting event is implemented. If an event is implemented with an operation call, type the name of the event raised in the target. If an event was implemented as a procedure call, type the name of the operation.

Click to show or hide information. Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Click to show or hide information. Sequence Expression

Type a sequence expression for a message. In sequence diagrams, you can omit sequence numbers. In collaboration diagrams, message sequence numbers are usually nested to indicate levels. For example, message 3.1.4 follows message 3.1.3 within activation 3.1.

Click to show or hide information. Direction

Choose a direction so that the message arrow points toward the target object.

Click to show or hide information. Flow Kind

Choose the kind of message flow you want. The arrowhead varies with the type you choose.

  • Procedure call is a nested flow of control in which the entire nested sequence is completed before the outer level sequence resumes.
  • Flat means a flat flow of control in which the arrow shows the progression to the next step in sequence. Messages are usually asynchronous.
  • Asynchronous indicates an explicitly asynchronous message between two objects in a procedural sequence.

Click to show or hide information. Operation

Visible when the flow kind is flat or a procedure call. Choose the operation that occurs when the message reaches its target object. If the operation isn't available, click New to add an operation to the classifier on which the target object is based.

Click to show or hide information. Signal

Visible when the flow kind is asynchronous. Choose the signal that is activated when the message reaches its target object. If the classifier on which the target object is based can't receive the signal, click New to add a reception to the classifier.

Click to show or hide information. New

Click to create a new operation or reception on the classifier on which the target object is based.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Association Class Properties dialog box (Details category)

Click to show or hide information. Visibility

Choose the type of visibility (public, private, or protected) that applies to the association class.

Click to show or hide information. IsRoot

Select to indicate that the association class can't have ancestors.

Click to show or hide information. IsLeaf

Select to indicate that the association class can't have descendants.

Click to show or hide information. IsAbstract

Select to indicate that the association class is abstract and that no instances can be created for the association class.

Click to show or hide information. IsActive

Select to specify that an object of the association class maintains its own thread of control.

Click to show or hide information. Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.


UML Shape Display Options dialog box

Use the options in this dialog box to display or suppress specific values of a UML element view, such as showing or hiding attributes on a Class shape.

The options available vary depending on the element type.

Click to show or hide information. Apply To The Same Selected uml Shapes In The Current Drawing Window Page

Select to automatically apply Shape Display Options settings for the current shape to all shapes of the same element type on the current diagram page.

Click to show or hide information. Apply To Subsequently Dropped UML Shapes Of The Same Type In The Current Drawing Window Page

Select to automatically apply Shape Display Options settings for the current shape to all selected shapes of the same element type that are subsequently dropped onto the current diagram page.


UML Node Properties dialog box (Components category)

Click to show or hide information. Choose the components which are deployed by this node

Lists the components in your model. Click a component to select it.

Click to show or hide information. Select All

Click to select all the components in the list.

Click to show or hide information. Deselect All

Click to deselect all the components in the list.


UML Packages dialog box

Click to show or hide information. Packages

Lists the packages that are currently defined.

To quickly edit the most commonly used settings for a package, click a field in the Packages list, and then select or type a value.

To access all of the settings for a package, select the package in the Packages list, and then click Properties.

  • Package Type a name for the package.
  • Stereotype Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by choosing UML then clicking Stereotypes.
  • IsRoot Select to indicate that the package can't have ancestors.
  • IsLeaf Select to indicate that the package can't have descendants.
  • IsAbstract Select to indicate that the package is abstract and that no instances can be created for the class.

Click to show or hide information. New

Click to add an undefined package to the list of packages.

To quickly edit the most commonly used settings for a package, click a field in the Packages list, and then select or type a value.

To access all of the settings for a package, select the package in the Packages list, and then click Properties.

Click to show or hide information. Properties

After you select a package under Packages, click to display the UML Package Properties dialog box where you can edit the property values associated with the package.

Click to show or hide information. Duplicate

Click to add a new package to the list with the same property values as the selected package.

Click to show or hide information. Delete

Click to delete the selected package from the list.


UML Message Properties dialog box (Arguments category)

Use the Arguments category to add, edit, or delete arguments.

Click to show or hide information. Arguments

Lists the parameters you have defined for the action you are creating.

To quickly edit the most commonly used settings for an argument, click a field in the Arguments list, and then select or type a value.

To access all of the settings for an argument, select the argument in the list, and then click Properties.

  • Argument The argument name comes from the parameters on which the argument is based. You can't change the name.
  • Type Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by choosing UML on the Stereotypes menu.
  • Language Choose the language you want to use to specify the argument value.
  • Value Type an expression, using the language you specified above, that determines the actual instance when the argument is evaluated.

Click to show or hide information. Properties

After you select an argument in the list, click to display three categories where you can edit the property values associated with the argument: Arguments, Constraints, and Tagged Values.


UML Class Properties dialog box (Components category)

Click to show or hide information. Choose The Components Which Implement This Class

Lists the components in your model. Select the components you want.

Click to show or hide information. Select All

Click to select all the components in the list.

Click to show or hide information. Deselect All

Click to deselect all the components in the list.


Generate dialog box

Use the Generate dialog box to set the target language and project location and to select the classes for which you want code to be generated.

You can add the selected classes to a Visual Studio project, creating a project-level folder, and you can add a solution folder.

Target Language

Select the language in which you want code to be generated. From the list, you can select C#, C++, or Visual Basic, and you can change your selection later if necessary.

Project

Click to show or hide information. Name

Specifies the name of the project. To activate this box, click the Add Classes to Visual Studio Project check box.

Click to show or hide information. Location

Specifies the path to which generated code files are automatically saved. To browse for the project folder, click the Browse button.

Click to show or hide information. Add Classes to Visual Studio Project

Select this check box to add the classes generated as code to a new project in Visual Studio. After you select this check box, you can:

  • Edit the project name.
  • Select a Visual Studio template on which to base your code.
  • Create a solution folder.
  • Edit the solution name.

Click to show or hide information. Template

Specifies the Visual Studio template to be used with the generated code. The template list varies depending on the target language.

For example, if you are generating code in Visual Basic or Visual C#, the Windows Application, Console Application, Class Library, and Windows Control Library templates are listed, among others. If you are generating code in Visual C++, the list includes templates for an ATL Project, an ATL Server Project, a Managed C++ Application, and many others.

Depending on the template you choose, Visual Studio generates additional files required for the specific application type.

Solution

Click to show or hide information. Name

Specifies the name of the solution, if any. To create a solution or edit the solution name, click Add Classes to Visual Studio Project.

Click to show or hide information. Create directory for solution

To create a solution folder, click the Create directory for solution check box, and then in the Name box, type a name for the solution.

Click to show or hide information. Project will be created at <<file path>>

Dynamic text showing the location of the files created as the path is generated. As you edit, changes you make to either the project name or the solution name are reflected in this text.

Select classes for code generation

In the tree view, make selections for the class elements you want included in the code that is generated. Expand or collapse the view as needed to select items.

When you select the top-level check box, all of the elements under that item are also selected by default. You can then individually clear the check box for any element that you do not want to include in the generated code

Note Static Model, Top Package, and Class1 are the default names of these UML elements. The names can be edited in the UML Model Explorer, and if you change them, the revised names appear in the list.


Preferences dialog box: Language settings

Click to show or hide information. Target language

Specifies the target language for the generated code. Options in this dialog box may change based on the target language setting.

Click to show or hide information. Project location

Specifies the path where the generated code files are saved. To browse for the project folder, click the Browse button.

Default: Language

Click to show or hide information. Comment style

Select the style for comments in the generated code.

Note Microsoft Visual Basic has just one option for comment style.

Click to show or hide information. Restore Default

Restores the comment style to the default setting for the target language.


Preferences dialog box: Class settings

Click to show or hide information. Target language

Specifies the target language for the generated code. Options in this dialog box may change based on the target language setting.

Click to show or hide information. Project location

Specifies the path where the generated code files are saved. To browse for the project folder, click the Browse button.

Default: Class

Select this category to set file and class template options.

Click to show or hide information. File template

Default templates that can't be edited are used for all target languages.

Click to show or hide information. Class template

Specifies how generated code is structured for class attributes and operations.

Header

Specifies the class header template. Click the button to the right of the list box to edit the selected header. You cannot edit the <default> header.

Implementation

Specifies the implementation class template. Click the button to the right of the list box to edit the selected template. You cannot edit the <default> template.

Click to show or hide information. Restore Default

Restores changes to default settings.


Preferences dialog box: Attributes settings

Click to show or hide information. Target language

Specifies the target language for the generated code. Options in this dialog box may change based on the target language setting.

Click to show or hide information. Project location

Specifies the path where the generated code files are saved. To browse for the project folder, click the Browse button.

Default: Attributes

Click to show or hide information. Template

Specifies the code template to be used when generating code for attributes.

From the list, select a template. Templates listed vary according to the target language setting.

Click to show or hide information. Tip

You can create additional code templates for specific attributes using the Code Templates category in the Preferences dialog box.

Click to show or hide information. Edit

To edit the selected template, click the Edit button.

Click to show or hide information. Restore Default

Restores changes to default settings.

Note Clicking Restore Default does not undo edits made in the Edit Template dialog box.


Preferences dialog box: Operations settings

Click to show or hide information. Target language

Specifies the target language for the generated code. Options in this dialog box may change based on the target language setting.

Click to show or hide information. Project location

Specifies the folder where the generated code files are saved. To browse for the project folder, click the Browse button.

Default: Operations

Templates specified determine the coding conventions for operations in the generated code.

Click to show or hide information. Operation kind

Specifies the type of operation for which header and implementation options can be set. You can select from among the following kinds of operations in the target languages:

Click to show or hide information. C#

  • Constructor
  • Destructor
  • Event
  • Indexer
  • Operator
  • Procedure
  • Property

Click to show or hide information. C++

  • Constructor
  • Destructor
  • Operator
  • Procedure

Click to show or hide information. Visual Basic

  • Constructor
  • Destructor
  • Event
  • Procedure
  • Property

Click to show or hide information. Operation template

Click to show or hide information. Header

Specifies the header template for the selected operation (C++ only). Click the Edit button to the right of the list to edit the selected header. You cannot edit the <default> header.

Click to show or hide information. Implementation

Specifies the implementation template for the selected operation. Click the Edit button to the right of the list to edit the selected template. You cannot edit the <default> template.

Click to show or hide information. Restore Default

Restores changes to default settings.

Note Clicking Restore Default does not undo edits made in the Edit Template dialog box.


Preferences dialog box: Relationship settings {

Expand all contracted text Show All

Preferences dialog box: Relationship settings

Click to show or hide information. Target language

Specifies the target language for the generated code. Options in this dialog box may change based on the target language setting.

Click to show or hide information. Project location

Specifies the path where the generated code files are saved.

Default: Relationships

Specifies settings to be used for ordered, unordered, and qualified collections. Collections specified in this dialog box are used when code is generated for attributes with multiplicity greater than 1.

Note Options for System.Collections described here pertain only to C# and Visual Basic, which use the same underlying class library (the Common Language Runtime). C++ uses different options.

Click to show or hide information. Tip

To add your own collections and make them available in the Collections lists, in the Preferences dialog box, under Default, select Code Templates. Under Categories, select Relationship, and then, under Templates, select the collection type to which you want to add your collection. Click the Edit button and type the collection in a separate line of its own. Click OK to accept the change.

Collections

Click to show or hide information. Ordered collection

For multiplicity greater than 1, elements are ordered into a list, System Collections.SortedList.

Click to show or hide information. Unordered collection

For multiplicity greater than 1, elements are not ordered; they form a set, named System Collections.ArrayList.

Click to show or hide information. Qualified collection

The collection, named System Collections.Hashtable, has qualifier attributes set.

Click to show or hide information. Restore Default

Restores changes to default settings.


Preferences dialog box: Code Templates settings

Click to show or hide information. Target language

Specifies the target language for the generated code. Options in this dialog box may change based on the target language setting.

Click to show or hide information. Project location

Specifies the path where the generated code files are saved.

Default: Code Templates

Specifies the coding convention templates that are available when setting preferences for generated code. You can create new templates, edit existing templates, and delete templates for use with code constructs in the various categories.

Click to show or hide information. Categories

Specifies the category for which templates can be created, edited, or duplicated.

From the list, select a category for the type of code construct with which you want to work. The available categories change based on the target language. You can select from the among the following code categories in the target languages:

Click to show or hide information. C#

  • Attribute
  • Relationship
  • ClassImpl
  • MethodImpl

Click to show or hide information. C++

  • ClassHeader
  • Attribute
  • MethodDefn
  • Relationship
  • ClassImpl
  • MethodImpl

Click to show or hide information. Visual Basic

  • Attribute
  • Relationship
  • ClassImpl
  • MethodImpl

Click to show or hide information. Templates

Lists the existing templates for the category selected in the Categories list.

Click to show or hide information. New

Opens a new, blank template in the Edit Template dialog box.

Click to show or hide information. Edit

Opens the template selected in the list for editing in the Edit Template dialog box.

Click to show or hide information. Duplicate

Creates a copy of the selected template, and opens it for editing. In the Edit Template dialog box, type a new name for the duplicated template, and revise as needed.

Click to show or hide information. Delete

Deletes the selected template from the list of available templates for the selected code category.

Click to show or hide information. Restore Default

Restores changes to default settings.


Edit Template dialog box

Use the Edit Template dialog box to enter the code convention text that you want to use for a specific code template.

Name

Displays the name of the code template available for editing.

  • If you open the Edit Template dialog box from the Preferences dialog box, you can edit the template name.
  • If you open the Edit Template dialog box from one of the Properties dialog boxes, you can't change the template name, but you can still edit the code.

In the box, type the coding convention text that you want this code template to contain.

Click to show or hide information. Tip

In addition to entering text, you can use any of the built-in macros that come with Visio. For example, if you type the macro %attrib_name% in the code box, the actual name of the attribute will appear in the generated code.

If you are editing a code template from one of the Properties dialog boxes, you can see how the edits you make will look in the code that is generated by clicking Preview code. For example, to preview code that will be generated in the implementation file for a class, in the UML Class Properties dialog box, click Code Generation Options under Categories, and then click Preview code.


UML Class Properties dialog box: Code Generation Options category

Click to show or hide information. Target language

Specifies the target language for the generated code.

Click to show or hide information. File name

Specifies file names used for code generation options. Options in this dialog box may change based on the target language setting.

Header

Specifies the header file name and path used when code is generated for the class selected in the UML diagram (for C++ only).

To browse for a file or edit the file path, click the Browse button to the right of the list.

Implementation

Specifies the implementation file name and path used when code is generated for the class selected in the UML diagram (for C++ only).

To browse for a file or edit the file path, click the Browse button to the right of the list.

Click to show or hide information. Class template

Specifies class names used for code generation options.

Header

Specifies the class name used when code is generated for the class selected in the UML diagram (for C++ only).

To edit the selected header file, click the Edit button.

Implementation

Specifies the code template to be used with the class implementation file.

To edit the selected template, click the Edit button to the right of the list. You cannot edit the <default> template.


UML Operation Properties dialog box: Code Generation Options category

Click to show or hide information. Target language

Specifies the target language for the generated code.

Operation

Click to show or hide information. Kind

Specifies the type of operation for which options can be set. Options in this dialog box may change based on the target language setting.

Click to show or hide information. Create Get Method or Create Add Method

When you select Property from the Kind list, Create Get Method is enabled for Visual Basic; when you select either Property or Indexer from the Kind list, Create Get Method is enabled for C#. To create a Get method for the operation, select this check box.

When the Target language is C# and you select Event from the Kind list, Create Add Method is enabled. To add a method for the operation, select this check box.

Click to show or hide information. Create Set Method or Create Remove Method

When you select Property from the Kind list, Create Set Method is enabled for Visual Basic; when you select either Property or Indexer from the Kind list, Create Set Method is enabled for C#. Select this check box to create a Set method for the operation.

When the Target language is C# and Event is selected from the Kind list, Create Remove Method is enabled. Select this check box to remove a method from the operation.

Location

Click to show or hide information. Inline

C++ only: Specifies that implementation code will be generated in the header file instead of the implementation file.

Click to show or hide information. File

C++ only: Specifies the file path and file name for the generated code files.

Operation template

Click to show or hide information. Header

C++ only: Specifies the header template to be used when code is generated for the selected operation. To edit the header, click the Edit button.

Click to show or hide information. Implementation

Specifies the implementation template for the selected operation. To edit the selected template, click the Edit button. You cannot edit the <default> template.

Click to show or hide information. Preview Code

Select to preview the code to be generated in the Code Preview window.

Click to show or hide information. Restore Default

Restores changes to default settings.

Note Clicking Restore Default does not undo edits made in the Edit Template dialog box.


UML Attributes Properties dialog box: Code Generation Options category

Click to show or hide information. Target language

Specifies the target language for the generated code. Options in this dialog box may change based on the target language setting.

Click to show or hide information. Template

Specifies the code template to use for the attribute that is selected in the UML Class Properties dialog box. Click the Edit button to edit the template.

Click to show or hide information. Preview Code

Displays a sample of the code that will be generated based on the current settings.

Click to show or hide information. Restore Defaults

Restores changes to default settings.


UML Association End Properties dialog box: Code Generation Options category

Click to show or hide information. Target language

Specifies the target language for the generated code. Options for this dialog box may change based on the target language setting.

Collections

Click to show or hide information. Ordered collection

For multiplicity greater than 1, elements are ordered into a list.

Click to show or hide information. Unordered colletion

For multiplicity greater than 1, elements are not ordered; they form a set, not a list.

Click to show or hide information. Qualified collection

The collection has qualifier attributes set.

Click to show or hide information. Restore Default

Restores changes to default settings.


Code Preview dialog box

The Code Preview dialog box allows you to preview, but not edit, the code that will be generated for a specific code construct, using the code template specified for Implementation in the UML <element> Properties dialog box.

Name

Name of the code construct to which the code template is being applied in the view of the code that you see here.

Click to show or hide information. Tip

To modify the code, use the Edit Template dialog box.


UML Report dialog box (Report Types tab)

Available Report Types

Lists the types of reports you can create from your UML model diagram.

To print, preview, export, customize, or set formatting options for a report, you must first select the report in the list. Report types are:

  • UML Activity
  • UML Component
  • UML Deployment
  • UML Statechart
  • UML Static Structure

Click to show or hide information. Customize

Opens a dialog box in which you can set advanced options for the selected report, such as the element categories or properties to be included.

Click to show or hide information. Print

Opens the Print dialog box in which you can set options for printing your report.

Click to show or hide information. Preview

Displays a preview of your report. This option will not work if you do not have a printer driver installed.

Click to show or hide information. Export

Opens the Export To RTF dialog box in which you can save your report in rich text format (RTF), which can be opened in most word processing programs.


UML Activity Advanced Options dialog box (UML Reports)

Categories

Lists the elements that can be included in a report.

Include <element> Properties in report

Lists the properties that can be included, based on the element currently selected under Categories. For UML Activity Reports, you can select from among the following elements and properties:

Click to show or hide information. Action State

Call Action

Deferred Events

Click to show or hide information. State

Entry Actions

Exit Actions

Internal Transitions

Click to show or hide information. Pseudo State

The pseudo state option has no additional properties.

Click to show or hide information. Transition

Full Details

Table Summary

Separator

You can select a formatting style to use in separating sections of the report.

Click to show or hide information. Sections of a UML Activity report

Model

State and model

Format options to divide these sections are:

None No separation between report sections.

Single Line Single line is drawn between each report section.

Double Line Double line is drawn between each report section.

New Page Page break occurs between each report section.

Report based on

Specifies whether the data to be used for the report is based on the elements in the model or the elements that have been used in diagrams.


UML Deployment Advanced Options dialog box (UML Reports)

Categories

Lists the elements that can be included in a report.

Include <element> Properties in report

Lists the properties that can be included, based on the element currently selected under Categories. For UML Deployment Reports, you can select from among the following elements and properties:

Click to show or hide information. Package

Dependency/Refinement/Usage/Trace/Binding

Event

Generalization/Specialization

Operations

Click to show or hide information. Node

Association (Class) Composition

Attributes

Dependency/Refinement/Usage/Trace/Binding

Generalization/Specialization

Operations

Click to show or hide information. Component

Association (Class) Composition

Attributes

Class

Dependency/Refinement/Usage/Trace/Binding

Generalization/Specialization

Operations

Click to show or hide information. Node Instance

Attribute Values

Click to show or hide information. Component Instance

Attribute Values

Click to show or hide information. Interface

Operations

Click to show or hide information. Object

Attributes

Dependency/Refinement/Usage/Trace/Binding

Link

Click to show or hide information. Composition

Association Ends

Attributes

Operations

Qualifier Attributes

Separator

You can select a formatting style to use in separating sections of the report.

Click to show or hide information. Sections of a UML Deployment report

Model

Package and Subsystem

Class and Model

Format options to divide these sections are:

None No separation between report sections.

Single Line Single line is drawn between each report section.

Double Line Double line is drawn between each report section.

New Page Page break occurs between each report section.

Report based on

Specifies whether the data to be used for the report is based on the elements in the model or the elements that have been used in diagrams.


UML Static Structure Advanced Options dialog box (UML Reports)

Categories

Lists the elements that can be included in a report.

Include <element> Properties in report

Lists the properties that can be included, based on the element currently selected under Categories. For UML Activity Reports, you can select from among the following elements and properties:

Click to show or hide information. Package

Dependency/Refinement/Usage/Trace/Binding

Event

Generalization/Specialization

Operations

Click to show or hide information. Class

Association (Class) Composition

Attributes

Components

Dependency/Refinement/Usage/Trace/Binding

Generalization/Specialization

Operations

Parameters

Receptions

Click to show or hide information. Data Type

Dependency/Refinement/Usage/Trace/Binding

Enumerations

Generalization/Specialization

Operations

Click to show or hide information. Object

Attribute Values

Dependency/Refinement/Usage/Trace/Binding

Link

Click to show or hide information. Signal

Dependency/Refinement/Usage/Trace/Binding

Generalization/Specialization

Parameters

Click to show or hide information. Binary Association (Class)

Association Ends

Attributes

Operations

Qualifier Attributes

Separator

You can select a formatting style to use in separating sections of the report.

Click to show or hide information. Sections of a UML Static Structure report

Model

Package and Subsystem

Class and Model

Format options to divide these sections are:

None No separation between report sections.

Single Line Single line is drawn between each report section.

Double Line Double line is drawn between each report section.

New Page Page break occurs between each report section.

Report based on

Specifies whether the data to be used for the report is based on the elements in the model or the elements that have been used in diagrams.


UML Report dialog box (Title tab)

Click to show or hide information. Report title

Specifies the title of your report. By default, the report title is the same as the report type, for example "UML Activity Report."

You can type a new title, type a formatting macro, and/or click Insert to add a formatting code.

Click to show or hide information. Report subtitle

Specifies a subtitle for the report. By default, the report subtitle is the same as the document title for the Visio drawing file (which is by default its file name). For example, if the drawing file is named Drawing1.vsd, the default subtitle for the report is Drawing1.

You can type a new subtitle, type a formatting macro, and/or click Insert to add a formatting code.

Click to show or hide information. Sample report title/subtitle

Displays the title or subtitle header as it will appear in the final report.

Click to show or hide information. Default

Restores the text in the Report title and Report subtitle boxes to the default values.

Click to show or hide information. Insert

Inserts a formatting macro at the insertion point in the Report Title and Document Title boxes. You can quickly add macro code for the following:

  • Document Title (drawing file name)
  • Current Date
  • File Name (file name with .vsd extension)
  • Author

Click to show or hide information. Starting page number

Sets the starting page number for the report.

Click to show or hide information. Page Setup

Opens the Page Setup dialog box, where you can change various printed page characteristics.

Click to show or hide information. Print

Opens the Print dialog box in which you can set options for printing your report.

Click to show or hide information. Preview

Displays a preview of your report. This option will not work if you do not have a printer driver installed.

Click to show or hide information. Export

Opens the Export To RTF dialog box in which you can save your report in rich text format (RTF), which can be opened in most word processing programs.


UML Report dialog box (Detail tab)

Check properties for UML elements to include for this report

Lists additional properties that can be included for UML elements in the report.

Click to show or hide information. Code generation

If selected, information about generated code will be included in the report. Elements that may have generated code associated with them include Classes, Attributes, Operations, Interfaces, and Association Ends.

Click to show or hide information. Constraints

If selected, constraints for UML elements will appear in the report.

Click to show or hide information. Documentation

If selected, documentation associated with a UML element will appear in the report.

Click to show or hide information. Tagged Values

If selected, tagged values defined for UML elements will appear in the report.

Click to show or hide information. Select All

Includes all of the currently displayed properties in your report.

Click to show or hide information. Deselect All

Excludes all of the currently displayed properties from your report.

Click to show or hide information. Print

Opens the Print dialog box in which you can set options for printing your report.

Click to show or hide information. Preview

Displays a preview of your report. This option will not work if you do not have a printer driver installed.

Click to show or hide information. Export

Opens the Export To RTF dialog box in which you can save your report in rich text format (RTF), which can be opened in most word processing programs.


Page Setup dialog box (Size/Type tab)

Click to show or hide information. Paper size

Sets the printer paper size for the report.

Click to show or hide information. Width

Displays the paper width for the selected paper size option.

Click to show or hide information. Height

Displays the paper height for the selected paper size option.

Click to show or hide information. Portrait

Orients the paper vertically.

Click to show or hide information. Landscape

Orients the paper horizontally.

Click to show or hide information. Set As Default Size

Uses the current settings as the default.

Click to show or hide information. Preview

Displays a thumbnail of how the current page setup will look when printed.


Page Setup dialog box (Margin tab)

Click to show or hide information. Top

Specifies the distance from the top edge of the paper to the first printed material, including header data.

Click to show or hide information. Bottom

Specifies the distance from the bottom edge of the paper to the first printed material. This includes footer data.

Click to show or hide information. Left

Specifies the distance from the left edge of the paper to the first printed material.

Click to show or hide information. Right

Specifies the distance from the right edge of the paper to the last printed material on the right edge of the page.

Click to show or hide information. Units of measure

Specifies the units used for margin settings.

Click to show or hide information. Draw border

Adds a border around the body of the report, exclusive of any header and footer information.

Click to show or hide information. Preview

Displays a thumbnail of how the current page setup will look when printed.


Page Setup dialog box (Header/Footer tab)

Click to show or hide information. Select a region to edit by clicking on the preview window

Changes the options for headers and footers on this tab. Click the arrows to move between left, center, and right headers and footers.

Click to show or hide information. Preview

Displays a thumbnail of how the current page setup will look when printed. Click areas of the Preview thumbnail to select header and footer regions to format.

Click to show or hide information. Left/Right/Center Header/Footer

Specifies the text that appears in the specified region.

You can type text or use a formatting macro.

Click to show or hide information. After macro expansion

Displays the expanded version of the formatting macro specified in the edit box.

Click to show or hide information. Font

Displays the font for the right and left header and footer text in the report. Click the Set button to change font settings for the selected region of the page.

Note Font settings apply only to header and footer segments that you specify in the Page Setup dialog box, not to report titles and subtitles.


UML Component Advanced Options dialog box (UML Reports)

Categories

Lists the elements that can be included in a report.

Include <element> Properties in report

Lists the properties that can be included, based on the element currently selected under Categories. For UML Component Reports, you can select from among the following elements and properties:

Click to show or hide information. Package

Dependency/Refinement/Usage/Trace/Binding

Event

Generalization/Specialization

Operations

Click to show or hide information. Node

Attributes

Dependency/Refinement/Usage/Trace/Binding

Generalization/Specialization

Operations

Click to show or hide information. Component

Attributes

Class

Dependency/Refinement/Usage/Trace/Binding

Generalization/Specialization

Operations

Click to show or hide information. Interface

Operations

Separator

You can select a formatting style to use in separating sections of the report.

Click to show or hide information. Sections of a UML Component report

Model

Package and Subsystem

Class and Model

Format options to divide these sections are:

None No separation between report sections.

Single Line Single line is drawn between each report section.

Double Line Double line is drawn between each report section.

New Page Page break occurs between each report section.

Report based on

Specifies whether the data to be used for the report is based on the elements in the model or the elements that have been used in diagrams.


UML Statechart Advanced Options dialog box (UML Reports)

Categories

Lists the elements that can be included in a report.

Include <element> Properties in report

Lists the properties that can be included, based on the element currently selected under Categories. For UML Component Reports, you can select from among the following elements and properties:

Click to show or hide information. State

Entry Actions

Exit Actions

Internal Transitions

Click to show or hide information. Pseudo State

The pseudo state option has no additional properties.

Click to show or hide information. Transition

Full Details

Table Summary

Separator

You can select a formatting style to use in separating sections of the report.

Click to show or hide information. Sections of a UML Statechart report

Model

State and model

Format options to divide these sections are:

None No separation between report sections.

Single Line Single line is drawn between each report section.

Double Line Double line is drawn between each report section.

New Page Page break occurs between each report section.

Report based on

Specifies whether the data to be used for the report is based on the elements in the model or the elements that have been used in diagrams.


Print dialog box (Range/Copies tab)

Click to show or hide information. Printer

Lists the currently selected printer.

Click to show or hide information. Copies

Enter the number of copies of each document you want.

Check Collate Copies to keep all pages of each copy in consecutive order.

Click to show or hide information. Collate Copies

To organize pages when you print multiple copies of a document, check Collate Copies. A complete copy of the document is printed before the first page of the next copy is printed.

Click to show or hide information. All

Print all pages in the document.

Click to show or hide information. Pages

Print a range of pages in the document.

You can specify a series of consecutive pages, or you can specify multiple series and single pages together.

Examples
Series | 3–10
Mixture | 1, 3–6, 8, 11

Click to show or hide information. Print To File

Direct print output to a file, instead of to a printer.

Specify a name for the output file.

This file contains all the printer codes that your print stream would normally contain. To print the file, use the DOS Copy command.

Click to show or hide information. Browse

Click to specify the location where you want to store the file you are going to create.

Do this before you specify a file name. Clicking this button clears any value in the prompt.

Click to show or hide information. Setup

Click to change printer configuration.

You can change the designated printer and some aspects of page formatting, including paper size.


Visual C++ Select Project dialog box

If multiple projects are available in the current workspace, you need to select the project you want to reverse engineer.

Select a project from the list of available projects, and then click OK.


Visual C++ Select Browse File dialog box

This dialog box appears if the UML Model Diagram solution locates more than one browse file in your current project directory.

Select a browse file from the list of existing browse files, and then click OK.

If you don't have a browse file in any project directories, you will need to create one for the current project.


Visio UML Options dialog box (Visual C++)

Select options in this dialog box to specify the system files you want to reverse engineer.

If you do not select any of the options in this dialog box, system classes used by the project are created as needed, but no class members are added.

Important Including system classes can significantly increase the length of time required to reverse engineer a project.

Click to show or hide information. MFC Classes

Adds MFC classes and class members.

Click to show or hide information. ATL Classes

Adds ATL classes and class members.

Click to show or hide information. Standard Include Files

Adds standard Include files including STL classes and class members.


Specify code template options for formatting generated code

  1. Open the UML model that includes the class definition data for code generation, and from the UML menu, point to Code, and then click Preferences.

For Language and Project Location, current settings are displayed. You can make changes to these settings before specifying default code templates. Templates listed vary according to the target language setting.

  2. Under Default Settings, click Class, Attributes, Operations, and/or Relationships, and then do one or more of the following:
  • To specify default class templates, select the File template and Class template settings you want (C++ only).
  • To specify the default template for attributes, select a template from the list.
  • To specify the default template for operations, make selections for Operation kind and Operation template.
  • To specify the default templates for relationships, make selections under Collections.
  3. When you have finished setting preferences, click OK.


Set code template preferences for Operations {

  1. Open the UML system that includes the class definition data for code generation, and from the UML menu, point to Code, and then click Preferences.
  2. Under Default Settings, click Operations.
  3. From the Operation kind list, select an operation type (such as Event, Procedure, or Constructor.)
  4. Under Operation template, set Header and Implementation options, editing the template if needed.

Note The Header option can be set only for C++.

  5. When you have finished setting operation preferences, click OK.


Use case diagram example

Use case diagram defining the system boundary, and how the actors outside it affect the use cases it contains.

  1. Defining the system boundary determines what is considered external or internal to the system.
  2. An actor represents a role played by an outside object. One object may play several roles and, therefore, is represented by several actors.
  3. A communicates relationship illustrates the participation of the actor in the use case.
  4. A use case is a set of events that occurs when an actor uses a system to complete a process. Normally, a use case is a relatively large process, not an individual step or transaction.


Sequence diagram example

Sequence diagram displaying how objects interact through time.

The vertical dimension in a sequence diagram represents time, with time proceeding down the page. The horizontal dimension represents different actors or objects.

  1. Objects are represented as object lifelines, that is, in terms of their existence at a particular time. Adjust line length to indicate an object's creation or destruction.
  2. Arrows represent messages between objects. An object can also send a message to itself.
  3. Add an activation (also called a focus of control) to a lifeline to indicate the time period during which an object is performing an action.
  4. A return message is shown as a dashed line.


Collaboration diagram example

Collaboration diagram displaying a set of objects and the messages they pass to acheive an operation.

  1. In a Classifier Role shape, the object's designator string is underlined to indicate that the object is an instance. You can also include the object name before the colon.
  2. Links, or association roles, indicate relationships and, with arrowheads, can also indicate navigability.
  3. Double-click a link, then click Message to define a message that flows along a link. Number procedure messages in accordance with call nesting.
  4. The first message always comes from outside the context you are including in the diagram.


Class static structure diagram example

Class static structure diagram defining the types of software objects in a system and their properties.

  1. To add attributes, operations, and other properties to class shapes, double-click a shape to open the UML Class Properties dialog box.
  2. Double-click an association to add adornments, such as multiplicity and navigability.
  3. In addition to the name and type shown here, attributes can also include visibility, an initial value, and specify whether the scope is class or instance.
  4. Define the parameters of an operation fully in a diagram when you want to communicate detailed programming specifications.


Statechart diagram example

Statechart diagram showing the transitions an object undergoes as it responds to outside eventsl

  1. The initial state is the state of an object before any events in the diagram have acted upon it.
  2. A state represents an instant in the life of an object. Double-click a State shape to add a name and list its internal actions and activities.
  3. Transitions indicate that, in response to an event, an object will go from one state to another and perform an action.
  4. The event which triggers the transition is named in the transition string. Double-click a transition to label it with a string that, in addition to an event signature, can also include a guard condition, an action expression, and more.


Activity diagram example

Activity diagram detailing the internal action states an object undergoes in its lifetime.

  1. The initial state is the state of an object before any events in the diagram have acted upon it.
  2. An action state is a type of state that represents a completed activity.
  3. A transition from an action state occurs when the action state's internal action is complete.
  4. To indicate concurrent activities that must be completed before the next activity can occur, use a join transition.
  5. Double-click transitions from action states to label them with guard conditions and action expressions.
  6. To indicate activities that can occur in parallel, use a fork transition.
  7. The final state represents the completion of activity in the situation the diagram represents.


Component diagram example

Component diagram displaying the structure of software code as cohesive components.

  1. In a component diagram, components are generic types rather than instances. To show component instances, use a deployment diagram.
  2. Dependencies indicate that a client component is dependent upon a supplier component in some way.


Deployment diagram example

Deployment diagram showing the structure a run-time system.

  1. In a deployment diagram, a node can represent a generic type or a specific instance.
  2. Place components and object instances within a node instance to indicate that the components and objects reside on the node.
  3. Dependencies connect components, sometimes through interfaces. You can use a stereotype to indicate the precise dependency.


About property values for UML elements

Each UML element has a UML Properties dialog box in which you can add values for properties associated with the element. Each category in the dialog box is associated with a different property.

You can control which property values display on a shape using the UML Shape Display Options dialog box.

The UML solution's semantic error checking feature identifies missing or inappropriate property values and indicates errors by marking the element's shapes in red.

The Code tab in the Output window displays language-specific warnings based on the target language you have selected for generating code.

Some UML Properties dialog box categories include lists of properties that you can edit directly by clicking a field and typing or selecting a value.


Associate property values with UML elements

To open an element's UML Properties dialog box and add values to an element's properties, double-click the icon that represents the element in the tree view, or the shape that represents the element in a diagram.


About the UML Model Explorer

When you open a new UML drawing file, the Model Explorer opens docked on the left side of the screen by default. You can change the default settings so that the Model Explorer window floats.

The Model Explorer displays the contents of your UML system in a hierarchical tree view.

The Model Explorer contains the tree view.

Using the tree view

When you create a model of a software system, the model appears as a hierarchical tree view in the Model Explorer window. UML elements and views of the model (diagrams) are represented by icons in the tree view.

You can add properties to elements and add new elements to the model by working with the icons. You can also drag an icon onto a drawing page to create a view of an element in a diagram.

Click to show or hide information. Tip

If you want to work with the UML solution without viewing the system model, hide the Model Explorer. To hide or to show the Model Explorer, on the UML menu, point to View, and then click Model Explorer.


2-element Constraint and OR Constraint shapes

A 2-element constraint [image] applies to two elements, such as two classes or two associations. The constraint is shown as a dashed arrow from one element to the other with the constraint string label in braces ({ }).

An OR constraint [image] indicates that any instance of a class may participate in only one association at one time. The constraint is shown as a dashed line connecting two or more associations, which must have a class in common. The line is labeled by the constraint string, OR, in braces ({ }).

Click to show or hide information. Learn why a 2-element Constraint or OR Constraint shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a 2-element Constraint or OR Constraint shape and add a stereotype and other property values

Double-click the shape.

Click to show or hide information. Add a stereotype to a 2-element Constraint or OR Constraint shape

Double-click the shape to which you want to add the Stereotype.

Click to show or hide information. Hide the stereotype on a 2-element Constraint or OR Constraint shape

Right-click the shape, click Shape Display Options, and then clear Stereotype.


Note shape

A note [image] is a diagram comment that has no semantic influence on the model elements.

Click to show or hide information. To connect a Note shape to one or more elements

Drag the control handle [image] at the center of the shape and glue it to a connection point [image] on another element.

Click to show or hide information. Learn why a Note shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Note shape and add a stereotype and other property values

Double-click the shape.

Click to show or hide information. Type the body of the note

Double-click the Note shape. Click Comment, and under Documentation type the text you want, and then click OK.

Click to show or hide information. Hide the stereotype on a Note shape

Right-click the shape, click Shape Display Options, and then, under General Options, clear Stereotype.


Constraint shape

A constraint [image] is a specification for conditions and propositions that must be maintained as true for the system to be valid. Constraints are expressed as text within braces ({ }) and may be written in a predefined language, such as Object Constraint Language (OCL) or in natural language.

Click to show or hide information. Connect a constraint to one or more elements

Drag the control handle [image] at the center of the Constraint shape and glue it to a connection point [image] on another element.

Click to show or hide information. Learn why a Constraint shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Constraint shape and add other property values

Double-click the shape.

Click to show or hide information. Hide the stereotype on a Constraint shape

Right-click the shape, click Shape Display Options, and then, under General Options, clear Stereotype.

Click to show or hide information. Hide the Constraint shape

Right-click the shape, click Shape Display Options, and then, under General Options, clear Constraint Shape.


Package shape

A package is a grouping of model elements and is represented by a symbol that looks like a manila file folder UML Package shape icon -- like file folder with tab top left. You can imagine an entire system description as a package with all the system elements in it, including other packages, models, diagrams, and elements.

A package is the basic organizing element of a UML model. Each element belongs to only one package, and one package can be nested in another. You can create new packages or add elements or views (diagrams) to packages by right-clicking icons in the tree view.

Dropping a Package shape onto a drawing page automatically creates a new static structure diagram on a new page. (Double-click the new static structure element in the tree view to go to that page.) To create a view, you can drag some of the elements that belong to the package onto the new page.

Click to show or hide information. Learn why a Package shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Package shape and add other property values

Double-click the shape.

Click to show or hide information. Control which property values are displayed on the Package shape

Right-click the shape on the drawing page, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Create a diagram within a Package shape

Right-click the shape on the drawing page, and then click Diagrams. Click New, select the diagram type you want, click OK, and then click OK again.

Click to show or hide information. Open a diagram contained in a Package shape

Right-click the shape on the drawing page, and then click Diagrams. Select the diagram you want, and then click OK.

Click to show or hide information. Navigate to other views of the Package shape

Right-click the shape on the drawing page, and then click Views. Select the view you want, and then click OK.

Click to show or hide information. Show, in a view, the relationships between the package and other elements

Right-click the Package shape on the drawing page, and then click Show Relationships.


Start a new UML system model

On the File menu, point to New, then point to Software, and then click UML Model Diagram.

By default, you open a modeling environment that includes the Model Explorer, a group of stencils, and a drawing page. The tree view window of the Model Explorer includes icons arranged in a tree view. The icons represent the UML elements and the views (or diagrams) in your model.


Specify the data types available in a system model

  1. On the UML menu, click Options, and click the UML Document tab.
  2. Select the data types you want to use in your UML model.


Add data types to a UML system model

  1. Open the UML diagram file that represents your system.
  2. Right-click the UML System icon in the tree view, click Packages, and then click New.
  3. In the Package column, type a name for the data types package (for example, My Data Types), type or choose other package properties, and then click OK.
  4. Right-click the new package, then click New, and then click Datatype.
  5. Type a name for the data type, type or choose the other properties you want, and then click OK.

An icon for the new data type is added below the package in the tree view.

  6. Repeat steps 4 and 5 until you have added all the data types you need.
  7. If you want the new data types to appear in each new system model you create, save the file as a template. In the Save As dialog box, for Save As Type, choose Template (*.vst). Open this template when you start a new model.

Click to show or hide information. Tip

You can add interfaces to a system the same way you add data types. Follow steps 1-3 above to add a new interface package to the system. Right-click the new package, and then click New, and then click Interface to add a new interface.


Add interfaces to a UML system model

  1. Open the UML Model Diagram file that represents your system.
  2. Right-click the UML System icon in the tree view, click Packages, and then click New.
  3. In the Package column, type a name for the data types package (for example, My Data Types), type or choose other package properties, and then click OK.
  4. Right-click the new package, then click New, and then click Interface.
  5. Type a name for the interface, type or choose the other properties you want, and then click OK.

An icon for the new interface is added below the package in the tree view.

  6. Repeat steps 4 and 5 until you have added all the interfaces you need.
  7. If you want the new interfaces to appear in each new system model you create, save the file as a template. In the Save As dialog box, for Save As Type, choose Template (*.vst). Open this template when you start a new model.

Click to show or hide information. Tip

You can add data types to a system the same way you add interfaces. Follow steps 1(3 above to add a new data types package to the system. Right-click the new package, and then click New, then click Data Type to add a new data type.


Add a new model to an existing UML system

  1. Open the UML Model Diagram file that represents your system.
  2. On the UML menu, click Models.
  3. In the UML Models dialog box, click New, and then click Properties.
  4. In the UML Model Properties dialog box, type or choose values for the properties you want.
  5. Click OK, and then click OK again.


Edit a UML model's properties

  1. Open the UML Model Diagram file that represents your system.
  2. On the UML menu, click Models.
  3. In the UML Models dialog box, select the model you want to edit, and then click Properties.
  4. In the UML Model Properties dialog box, choose or type values for the properties you want to change.
  5. Click OK, and then click OK again.


Delete a UML model

  1. Open the UML Model Diagram file for the system that includes the model you want to delete.
  2. On the UML menu, click Models.
  3. In the UML Models dialog box, select the model you want to delete, click Delete, and then click OK.

In the UML solution, a system must contain at least one model. Therefore, you can't delete the last model in a system.

Click to show or hide information. Tip

You can also delete a model by right-clicking the model's icon in the tree view, and then clicking Delete.


Add a diagram to a UML model

  1. In the tree view, right-click the top package in the model you want to add a diagram to.
  2. Point to New, and then click the type of diagram you want to add.

When you add a new diagram, a new icon appears in the tree view and a new drawing page and stencil with the appropriate shapes opens. A watermark with the name of the diagram type appears in the workspace.

Note Statechart and often activity diagrams are associated with particular classes or use cases. To add a statechart or activity diagram to a model, right-click the appropriate class or use case icon in the tree view, point to New, and then click the type of diagram you want to add.

You can also add activity diagrams by right-clicking a package, pointing to New, and then clicking Activity Diagram. You can create static structure diagrams by right-clicking a class icon.

Click to show or hide information. Tip

You can also add a diagram to a model by right-clicking the drawing page for an existing static structure, use case, collaboration, sequence, deployment, or component diagram, and then clicking Insert UML Diagram on the shortcut menu.


Navigate to a UML diagram

In the tree view, double-click the icon that represents the diagram you want to navigate to.

The drawing page for the diagram appears along with the stencil including the shapes appropriate for that diagram type.

Click to show or hide information. Tip

You can also navigate to a diagram by clicking the page tab Tab for an individual page in a file. in the bottom-left corner of the window for the diagram you want to see.


Move an element in the tree view

In the tree view, drag an icon representing the element you want to move from the package it's currently in to the new package.


Delete attributes from a UML element

  1. Double-click the icon in the tree view or the shape in a diagram that represents the element.
  2. Click Attributes, select the attribute you want to delete.
  3. Click Delete, and then click OK.

Click to show or hide information. Tip

You can also delete an attribute by right-clicking the attribute's icon in the tree view, and then clicking Delete on the shortcut menu.


Delete operations from a UML element

  1. Double-click the icon in the tree view or the shape in a diagram that represents the element.
  2. Click Operations and select the operations you want to delete.
  3. Click Delete, and then click OK.

Click to show or hide information. Tip

You can also delete an operation by right-clicking the operation's icon in the tree view, and then clicking Delete on the shortcut menu.


Indicate a dependency relationship between UML elements

  1. Drag a Dependency shape from the UML Static Structure, UML Deployment, or UML Component stencil onto the drawing page and place it near the elements you want to relate.
  2. Glue the endpoint with an arrowhead to a connection point [image] on the element the other element depends on. Glue the endpoint without an arrowhead to a connection point on the element that depends on the other element.
  3. Double-click the dependency to add a name, stereotype, and other properties.

Click to show or hide information. Tip

If you want to indicate a trace, refinement, usage, or binding dependency, you can use the Trace, Refinement, Usage, or Binding shapes from the UML Static Structure stencil.


Add an interface to a class, component, or other element

  1. In a static structure, component, or deployment diagram, drag the lollipop Interface shape (represented by a line and circle) onto the drawing page.
  2. Glue the endpoint without the circle to a connection point [image] on the class, component, or other element.
  3. Double-click the Interface shape to add a name, operations, and other property values.

Click to show or hide information. Tip

You can also represent an interface with a rectangular Interface shape that resembles a class. Use this shape when you want to display a list of the interface operations.

To change the type of shape that displays for an interface, right-click the Interface shape and click Show as Class-like Interface or Show as Lollipop Interface.


Add a constraint that applies to two elements

  1. Drag a 2-Element Constraint or OR Constraint shape onto the drawing page.
  2. Connect the endpoints of the constraint shape to connection points [image] on the two elements you want to apply the constraint to.
  3. Double-click the constraint shape.
  4. Under Body, type a description for the constraint, and then click OK.

The constraint description appears in braces on the arrow.


Add a constraint to an attribute or operation

  1. Double-click the shape with the attribute or operation to which you want to add a constraint, and then click Attributes or Operations.
  2. Click New to define a new attribute or operation, or select an existing attribute or operation, and then click Properties.
  3. Click Constraints, click New, and then click Properties.
  4. Type a name for the constraint. Under Body, type a description for the constraint, type or choose the other constraint properties you want, and then click OK.
  5. Click OK, and then click OK again.


Remove a stereotype from a UML element

  1. Double-click the icon in the tree view or the shape in the diagram representing the element with the stereotype you want to remove.
  2. In the element's UML Properties dialog box, for Stereotype, select the blank line at the top of Stereotype list, and then click OK.


Edit a stereotype definition

  1. In the UML Model Diagram file that represents your system, click Stereotypes on the UML menu.
  2. In the UML Stereotypes dialog box, select the stereotype you want to edit, and then click Properties.
  3. Type or choose the options you want to change.
  4. Click OK, and then click OK again.


Remove a stereotype definition

  1. In the UML Model Diagram file that represents your system, click Stereotypes on the UML menu.
  2. In the UML Stereotypes dialog box, select the stereotype you want to remove.
  3. Click Delete, and then click OK.


Delete tagged values from a UML element

  1. Double-click the icon in the tree view or the shape in the diagram representing the element with tagged values you want to delete.
  2. In the element's UML Properties dialog box, click Tagged Values.
  3. Select the tagged value you want to delete, and then click Delete.

You can only delete tagged values you added to the UML element. You can't delete an element's default tagged values.

  4. Click OK.


Set attribute visibility between two elements

  1. Create icons representing two classifiers in the tree view or drag shapes representing the two classifiers onto a drawing page.
  2. Double-click the icon or shape for the classifier that will be able to see or reference the other.
  3. Click Attributes, click New, and then click Properties.
  4. Type a name for the attribute.
  5. Under Type Expression, for Type, choose the classifier that the first classifier will reference. Type values for Prefix and Suffix if you want to fully represent the attribute type.
  6. Under Visibility, choose the type of visibility you want.
  7. Click OK, and then click OK again.


Connect UML shapes

To connect UML shapes, do one of the following:

  • Drag a begin point [image] or end point [image] on a one-dimensional (1-D) shape to a connection point [image] on a two-dimensional (2-D) shape.
  • Drag a begin point or end point on a one-dimensional (1-D) shape to the center of a two-dimensional (2-D) shape.

A red outline indicates a proper connection.

Connect the green control handle of one shape to another, or drag the control handle onto the other shape.

When you release the cursor, the endpoint of the 1-D shape turns red to indicate that it's glued and you can move either shape without breaking the connection.


Control which property values display on a shape in a UML diagram

  1. Right-click a shape in a UML diagram, and then click Shape Display Options.
  2. In the UML Shape Display Options dialog box, select and clear options to display or hide property types and values.


Create a realizes relationship between two elements

  1. In a static structure diagram, right-click any class shape (Class, Parameterized Class, Utility or MetaClass), click Shape Display Options, and then, under General Options, select Realization Link.
  2. Glue the control handle [image] for the realization link on a class shape to a connection point [image] on the interface, class, or other element.


Change the default settings for the UML solution

With the UML Model Diagram solution open, click Options on the UML menu.


About shape migration in the UML solution

Shape migration refers to the automatic process of updating shapes from a previous version of Microsoft Visio to the current version.

You should migrate shapes

  • When you open a file that was created in Visio 5.0.

If Microsoft Visio 2002 detects out-of-date shapes, you are prompted to update the shapes.

  • Any time a file contains out-of-date shapes.

A file can contain out-of-date shapes if you chose not to migrate shapes when you opened a file created in a previous version.

If you choose not to migrate shapes, the shapes

  • Maintain their behavior from the previous version of the software.
  • Have the same right-click menus that they had in the previous version of the software.
  • Might not have the same text formatting.
  • Might not match the Microsoft Visio 2002 documentation.


Migrate UML shapes

  1. Open the file that contains the shapes you want to migrate.
  2. On the Tools menu, point to Macros, point to Visio Extras, and then click Update Shapes.
  3. Under Options, choose whether or not to back up the original document.

Click to show or hide information. Tip

Create a backup if you want to open the file in a previous version of Microsoft Visio.

  4. Click OK.
  5. Optional: To view a log file of the migrated shapes, click Yes when prompted.
  6. On the File menu, click Save to save the newly migrated shapes.


Troubleshoot the UML menu

Solution-specific menus can disappear when Microsoft Visio encounters an unexpected error from either an internal or external source.

If the UML menu disappears:

  1. If Microsoft Visio shuts down unexpectedly, restart it.
  2. On the Tools menu, click Options.
  3. On the Advanced tab, select Enable automation events, and then click OK.
  4. On the File menu, click Exit.
  5. Reopen the UML Model Diagram solution.


Add UML elements to a model

Click to show or hide information. Add a new element to the tree view

  1. In the tree view, right-click the package or class you want to add the new element to, and then point to New.
  2. Click the type of element you want to add.

An icon for the new element appears in the tree view.

Click to show or hide information. Add a new element to a diagram

  1. In the tree view, double-click the icon that represents the diagram you want to add a new element to.

The appropriate stencil and drawing page appear.

  2. Drag the shape representing the element you want to add to a diagram from the stencil onto the drawing page.

For many shapes, such as Class shapes, Use Case shapes, and Component shapes, an icon representing the new element appears in the tree view.

Click to show or hide information. Tip

You can also add an element to a diagram by creating a new element in the tree view, and then dragging the element onto the drawing page.

Click to show or hide information. Add a view of an existing element to a diagram

  1. In the tree view, double-click the icon that represents the diagram you want to add a copy of an element to.

The appropriate stencil and drawing page appear.

  2. From the tree view, drag the icon for the element you want to create a view of onto the drawing page.

A shape representing the element appears on the drawing page, but no additional icon representing a view of the element appears in the tree view.

Note Any changes you make to the original element automatically appear in views of the element.

Click to show or hide information. Duplicate an existing element in a diagram

  1. In a diagram, select the element you want to duplicate.
  2. Press CTRL+drag to create a copy of the element.

Two elements in the same package cannot have the same name, so when you duplicate an element, a new name is automatically assigned to the duplicate.

Click to show or hide information. Tip

By default, pressing the CTRL key while dragging an element creates a copy of the element. You can change the default behavior so that CTRL+drag creates a view of an element rather than a copy. To change the behavior, on the UML menu, click Options, click the UML Add-On tab, and then, for Shape Ctrl-Drag behavior, choose Copy object view.

Click to show or hide information. Duplicate an existing element in the tree view

  1. Right-click the icon representing an element you want to duplicate, and then click Duplicate.

Two elements in the same package cannot have the same name, so when you duplicate an element, the duplicate automatically receives a new name.

  2. Drag the duplicate icon to the appropriate package in the tree view.


Delete UML elements from a model

Click to show or hide information. Delete an element from the tree view

In the tree view, right-click the icon representing the element you want to delete, and then click Delete on the shortcut menu.

The element is deleted from the tree view and all views of the element are deleted from diagrams.

Click to show or hide information. Delete a shape from a diagram

  1. Select the shape and press the DELETE key.

If the option Prompt for model element(s) delete on delete of shape(s) is selected in the UML Options dialog box (UML Add-on tab), the Delete Shape message box appears.

If this option is not selected, the current view of the element is deleted from the diagram, but the element is not deleted from the model.

Click to show or hide information. Tip

To change the default behavior for deleting an element from a diagram, on the UML menu, click Options. Under UML drawing page behavior on the UML Add-On tab, select or clear Prompt for model element(s) delete on delete of shape(s), and then click OK.

  2. In the Delete Shape message box (appears only when the Prompt option is selected) click one of the following:
  • Yes to delete only the current view of the element and keep the element in the UML model.
  • No to delete the current view of the element, the element in the model, and all of its other views.

Click to show or hide information. Change the default delete behavior for UML elements

  1. On the UML menu, click Options.
  2. Under UML drawing page behavior on the UML Add-On tab, select or clear the following option for deleting, and then click OK:

Prompt for model element(s) delete on delete of shape(s)

If this option is selected, each time you delete a shape from a diagram, you are prompted to choose to delete only the shape (the element view) or both the shape and the model element.

If this option is not selected, only the shape (element view) is deleted.


About the Properties and Documentation windows

The Properties and Documentation windows provide additional information about the selected UML element. These windows do not appear by default. To view one of these windows, on the UML menu, click View, and then click Documentation or Properties.

You can move the Properties or Documentation windows so that they float, resize the window by dragging one of its borders, stack the windows together, or dock the window in another location by dragging it to any edge of the drawing page window.

Click to show or hide information. Properties window

When you select a UML shape in a diagram, the main properties associated with the element appear in the Properties window. You cannot edit the properties in this tab; it is provided for viewing purposes only.

Click to show or hide information. Documentation window

The documentation tagged value associated with a UML element appears in the Documentation window when you select either an element icon in the tree view or a shape on a drawing page that represents the element. You can also add documentation to an element by selecting its icon or shape, and then typing the documentation text here.


Turn off semantic error checking

  1. From the UML menu, click Options.
  2. In the UML Options dialog box, click the UML Add-on tab.
  3. Under UML model element, clear the Check semantic errors on UML model element check box, and then click OK.


Check code for language-specific syntax errors

  1. Open the UML model that includes the class definition data for code generation.
  2. From the UML menu, point to Code, and then click Check.

Code check results and warnings, if any, appear in the Code tab of the Output window.

  3. To locate an element associated with a warning in the Code tab, double-click the warning message.

The icon for the UML element with the code error is selected in the Model Explorer tree view. If a view of the element exists on the drawing page, that shape is also selected on the page.


Check for full compliance with UML 1.2 specification

  1. From the UML menu, click Options.
  2. In the UML Options dialog box, click the UML Document tab.
  3. Under Miscellaneous, clear the Relax semantic error checking check box, and then click OK.

Note In the UML Options dialog box, the option Relax semantic error checking is set by default.


UML Report title formatting macros

Using the Titles tab in the UML Report dialog box, you can specify a report title, a report subtitle, and other formatting options. To customize your report's title and subtitle, you can enter text, use the Insert button to add a formatting macro, or type macro text.

Note You can also use the formatting macros listed in the following tables when setting options on the Header/Footer tab of the Page Setup dialog box.

Click to show or hide information. Use properties of the drawing file in a report title

You can insert properties of the Visio UML drawing file (*.vsd) as part of the report title and report subtitle when working in the Title tab of the UML Report dialog box. The following table describes formatting macros based on information found on the Summary tab of the properties dialog box for the UML drawing file, for example, the Drawing1.vsd Properties dialog box.

Click to show or hide information. Tip

To view file properties for the Visio drawing file (*.vsd), from the File menu, click Properties.

Macro text to type | Macro expansion
&Author | Author of the drawing file, as specified in the Properties dialog box.
&Category | Category, as specified in the Properties dialog box.
&Company | Company, as specified in the Properties dialog box.
&DocTitle | Title of the drawing file, as specified in the Properties dialog box. Note By default, the title of a file is the same as its file name, but you can modify this title in the Properties dialog box. This document title should not be confused with the title of the UML report.
&Descs | Description, as specified in the Properties dialog box.
&Hyperlink | Hyperlink base, as specified in the Properties dialog box.
&Keywords | Keywords specified in the Properties dialog box.
&Manager | Manager, as specified in the Properties dialog box.
&Subject | Subject, as specified in the Properties dialog box.

Click to show or hide information. Use system and file information in a report title or subtitle

You can insert the drawing file name in different formats and use system settings such as date and time in report titles and subtitles.

Macro text to type | Macro expansion
&File | File name of the UML drawing file, for example, Drawing1.vsd.
&FileUpper | File name in upper case, for example, DRAWING1.VSD.
&FileLower | File name in lower case, for example, drawing1.vsd.
&PageCount | Total number of pages in the document.
&PageNo | Page number in the report.
&Date | Current system date.
&Time | Current system time.
&LastSaved | Last time the document was saved.


Create, format, view, or print a UML report

  1. In an open UML diagram, from the UML menu, click Report.
  2. On the Report Types tab, select the type of report you want to create, and then select elements and properties to include in the report. For example, you can prepare a report of a UML Static Structure diagram.

Click to show or hide information. How?

  1. On the Report Types tab, select UML Static Structure Report, and then click Customize.
  2. In the UML Static Structure Advanced Options dialog box, click an element under Categories.
  3. For each selected element, click properties that you want to include in the report.

Clear check boxes for elements and/or properties that you want to exclude from the report.

  4. Under Separator, set options for how you want elements in the report to be separated (no separation, formatting lines, or page breaks).
  5. When finished setting options, click OK.
  3. Using the Title tab, add a report title and subtitle, and customize other report formatting.

Click to show or hide information. How?

  1. Under Report title, type a title or use a formatting macro.
  2. Under Report subtitle, type a subtitle or use a formatting macro.

To quickly add macros for the following items, click Insert:

  • Document Title (drawing file name)
  • Current Date
  • File Name (file name with .vsd extension)
  • Author
  3. Under Pagination, you can type a new starting page number for the report.
  4. Using the Detail tab, include or exclude code generation options, constraints, documentation, or tagged values in the report.
  5. From any tab in the UML Report dialog box, you can preview, print, or export the report.
  • To preview a report before you print or export it, click Preview. To change the contents of the report, click Close and make changes in the UML Report dialog box.
  • To print the report, click Print, and then click OK.
  • To export the report as a document file, click Export, specify a file name in the Export to RTF dialog box, and then click Save.
  6. When you have finished setting options and viewing, printing, or exporting the report, in the UML Report dialog box, click Close.


Save (export) a UML report as an RTF file

  1. From the UML menu, click Report.
  2. Format the report as needed, and then in the UML Report dialog box, click Export.
  3. In the Export To RTF dialog box, select a location to save the report, type a file name, and then click Save.


Work with Visio UML Diagrams in Visual Studio.NET

Click to show or hide information. Add a Visio UML diagram to a Visual Studio solution

  1. In Visual Studio, in the Solution Explorer, select a solution.
  2. On the Project menu, click Add New Item.
  3. In the Add New Solution Item dialog box, click Visio Files, and then click UML.
  4. Under Templates, click a UML diagram, and then click Open.

Visio launches, and the new UML diagram file opens for editing.

Click to show or hide information. Open an existing Visio UML diagram from Visual Studio

  1. In Visual Studio, select a solution in the Solution Explorer.
  2. On the Project menu, click Add Existing Item.
  3. In the Add Existing Solution Item dialog box, select the UML diagram you want, and then click Open.

Visio launches with the selected file open for editing.


Customize Microsoft Visual C++ 6.0

  1. In Visual C++, on the Tools menu, click Customize.
  2. In the Customize dialog box, click the Add-Ins And Macro Files tab.
  3. In the Add-Ins And Macro Files list, select Visio UML Add-In.

The Visio UML Add-In appears with a check mark beside it.

  4. Click Close.

The floating, five-button Visio UML Add-In toolbar appears.

  5. If you want the toolbar to be available each time you open Visual C++, dock the toolbar by dragging it to the toolbar area.

Click to show or hide information. Tip

If you want to create keyboard shortcuts for each of the Visio UML Add-In toolbar buttons, on the Tools menu click Customize, click the Keyboard tab, and then choose the Add-Ins category.


Generate a Browse Information file in Microsoft Visual C++ 6.0

  1. In Visual C++, on the Project menu, click Settings.
  2. In the Project Settings dialog box, choose the type of build configuration you want, click the C/C++ tab, and then select Generate Browse Info.
  3. Click the Browse Info tab to specify the name and location of the Browse Information file, select Build Browse Info File, and then click OK.


Customize Microsoft Visual Basic 6.0

  1. In Visual Basic, on the Add-Ins menu, click Add-In Manager.
  2. In the Add-In Manager dialog box, select Visio UML Add-In. For Load Behavior, select Loaded/Unloaded and Load On Startup, and then click OK. The Visio UML Add-In toolbar appears.

Click to show or hide information. Tip

When the Microsoft Visio UML Add-In creates the toolbar, it also adds commands to the Tools menu. You can locate the commands by clicking Visio UML Solution on the Tools menu.


Work with classes and objects (UML static structure diagrams)

Click to show or hide information. Add an interface to a class, component, or other element

  1. In a static structure, component, or deployment diagram, drag the lollipop Interface shape (represented by a line and circle) onto the drawing page.
  2. Glue the endpoint without the circle to a connection point [image] on the class, component, or other element.
  3. Double-click the Interface shape to add a name, operations, and other property values.

Click to show or hide information. Tip

You can also represent an interface with a rectangular Interface shape that resembles a class. Use this shape when you want to display a list of the interface operations.

To change the type of shape that displays for an interface, right-click the Interface shape and click Show as Class-like Interface or Show as Lollipop Interface.

Click to show or hide information. Indicate a realizes relationship between a class and an interface or other element

  1. In a static structure diagram, right-click any class shape (Class, Parameterized Class, Utility or MetaClass), click Shape Display Options, and then, under General Options, select Realization Link.
  2. Glue the control handle [image] for the realization link on a class shape to a connection point [image] on the interface, class, or other element.

Click to show or hide information. Add receptions to a classifier

  1. Double-click the shape representing the classifier you want to add receptions to, and then click the Receptions category.
  2. Click New to add a new reception.
  3. Click the Reception category. Type a name for the reception in the Reception column. In the Signal column, choose the signal to which the classifier, prepared by the reception, reacts, and then choose the other property values you want.

Note A signal element must exist in the model for it to be available in the Signal list.

  4. In the Exceptions category, choose the exceptions, if any, that can be generated by the reception.

Note An exception element must exist in the model for it to be available in the Signal list.

  5. Add any constraints or tagged values you want, and then click OK until you close the shape's UML Properties dialog box.

Click to show or hide information. Add template parameters to a class

  1. Double-click the shape (Parameterized Class, Class, Utility, Metaclass, or Bound Element) representing the element that you want to add parameters to, and then click Template Parameters.
  2. Click New to add a new parameter.
  3. In the Template parameters list:
  • To edit an existing parameter, type a new name in the Template Parameter column.
  • To edit the type, click a Type field, click the arrow, and then select the type from the list.
  • To add documentation, type in the Documentation box.
  4. Click OK to accept the changes and close the UML Class Properties dialog box.

Click to show or hide information. Tip

You can make any class a parameterized class by adding parameters to a class shape. To hide parameters on any class shape, right-click the shape, click Shape Display Options and then, under Suppress, select Template Parameters.

Click to show or hide information. Bind template parameters to a class

  1. Drag a Bound Element shape from the UML Static Structure stencil onto the drawing page near the Parameterized Class shape with parameters you want to bind.
  2. Drag a Binding shape onto the drawing page and glue the endpoint without an arrowhead to a connection point [image] on the bound element.
  3. Glue the Binding endpoint with an arrowhead to a connection point on the Parameterized Class shape.
  4. Double-click the Binding shape, and then click Bound Arguments.
  5. Under Bound Arguments, select a parameter to which you want to bind a type (if the parameter has no type specified) or select a value (if the parameter has a type specified). Click Properties, choose the type or type the value you want, and then click OK.
  6. Click OK to close the UML Binding Properties dialog box.

Attributes and operations associated with the parameterized class are passed to the bound element. Unbound parameters (with no specified type) that you have assigned to the class as attribute types or operation return types, are replaced in the bound element by the types you specified in step 5 above.

Click to show or hide information. Create an object as an instance of a class

  1. In a static structure diagram, drag a Class shape onto the drawing page to represent the class you want the object to be an instance of.
  2. Optional Double-click the Class shape to open the UML Class Properties dialog box. Click Attributes, and then click New to add attributes to the class. Click OK, and then click OK again.
  3. Drag an Object shape onto the drawing page, and then double-click the shape.
  4. In the UML Object Properties dialog box, click Object and type a name for the object. Under Class, select the class you want the object to be an instance of.
  5. Click Attribute Values and select the attribute you want to add an instance value to, and then click Properties. Type a value for the attribute.
  6. Click Attribute Link, add any other property values you want, and then click OK.
  7. Repeat steps 5 and 6 for all the attributes you want to add instance values to, and then click OK.

Click to show or hide information. Delete template parameters from a class

  1. Double-click the shape (Parameterized Class, Class, Utility, Metaclass, or Bound Element) representing the element with parameters you want to delete, and then click Template Parameters.
  2. Select the template parameter you want to delete, click Delete, and then click OK.

Click to show or hide information. Edit template parameters for a class

  1. Double-click the shape (Parameterized Class, Class, Utility, Metaclass, or Bound Element) representing the element with the parameters you want to edit, and then click Template Parameters.
  2. In the Template parameters list, for each parameter you want to edit, click a Type field. Then, click the arrow and select a type from the list.

Note You can assign parameters with no type specified to attributes as types or to operations as return types.

  3. In the Template parameters list, for each parameter that you want to edit, type a new name.
  4. In the Documentation box, type the documentation you want.
  5. Click New to add another parameter (and follow steps 3 through 5), or click OK to close the UML Class Properties dialog box.

Click to show or hide information. Hide the attribute and operations sections of a class

  1. Right-click the Class shape, and then click Shape Display Options.
  2. In the UML Shape Display Options dialog box, under Suppress, select Attributes to hide the attributes section, and then select Operations to hide the operations section.

Click to show or hide information. Tip

To show the attributes and operations sections again, right-click the shape, click Shape Display Options, and then clear Attributes and Operations.

Click to show or hide information. Indicate that classes in a package may be referenced

  1. In a package diagram, drag a Dependency shape onto the drawing page.
  2. Glue the Dependency endpoint without an arrowhead to a connection point on the package that will reference the classes in another package.
  3. Glue the Dependency endpoint with an arrowhead to a connection point [image] on the package that contains the target classes that will be referenced.
  4. Double-click the Dependency shape to open the UML Dependency Properties dialog box.
  5. Under Name, type a name for the dependency. Under Stereotype, choose Import, and then click OK.

Note Connecting packages with an <<import>> dependency only indicates that classes can be referenced. You still need to set the appropriate visibility for the target classes.

Click to show or hide information. Show the implementation of a type by an implementation class

  1. In a static structure diagram, drag a Class shape onto the drawing page. Double-click the shape.
  2. In the UML Class Properties dialog box, click Class and type a name for the class. Under Stereotype, choose Type, and then click OK.
  3. Drag a second Class shape onto the drawing page. Double-click the shape.
  4. In the UML Class Properties dialog box, click Class and type a name for the class. Under Stereotype, choose Implementation Class, and then click OK.
  5. Right-click the implementation class and click Shape Display Options. In the UML Shape Display Options dialog box, under General Options, select Realization Link, and then click OK.
  6. Drag the control handle [image] on the implementation class shape to create a connector representing a realizes relationship.
  7. Glue the endpoint on the realization connector arrowhead to a connection point [image] on the Class shape representing the type.


Work with associations (UML static structure diagrams)

Click to show or hide information. Add adornments to association ends

  1. In a static structure diagram, double-click a Binary Association, Association Class, or N-ary Association shape.
  2. Under Association Ends, select the end to which you want to add adornments, and then click Properties.

Click to show or hide information. Tip

You can directly edit commonly used property settings in the Association Ends list by clicking a field, and then typing or selecting a value.

  3. Click Association End, and type or choose the end name, multiplicity, navigability, aggregation and other options you want, and then click OK.
  4. Repeat steps 2 and 3 for each association end that you want to edit.
  5. Type or choose the properties options you want in the Association category and other categories, and then click OK.

Click to show or hide information. Add qualifiers to an association

  1. Double-click the Binary Association, Association Class, N-ary Association, or N-ary Association Class shape you want to add a qualifier to.
  2. Under Association Ends, select the association end you want to add a qualifier to, and then click Properties.
  3. Click Qualifier Attributes, click New, and then click Properties.
  4. Type or choose values for the qualifier properties you want.
  5. Continue to click OK until the UML Properties dialog box closes.

A small rectangle is added to the association end with the qualifier.

Click to show or hide information. Indicate a composition relationship between classes

  1. Drag a Composition shape from the UML Static Structure stencil onto the drawing page near the classes you want to relate.
  2. Glue the endpoint near the diamond to a connection point [image] on the class the other element is a component of. Glue the endpoint without a diamond to a connection point on the class that is a component.
  3. Double-click the Composition shape to add a name and other adornments to the association ends.
  4. Click OK.

Click to show or hide information. Tip

You can also indicate composition by adding adornments to the association ends of a Binary Association, Association Class, or N-ary Association shape. Double-click the shape. Select the end to which you want to add a composition diamond, and then click Properties. Click Association End and under Aggregation choose Composite. Click OK, and then click OK again.

Click to show or hide information. Indicate an association between three or more classes

  1. Drag an N-ary Association shape from the UML Static Structure stencil onto the drawing page near the classes you want to relate.
  2. Double-click the N-ary Association shape to open its UML Properties dialog box. Under End Count, set the number of association ends you want, type or choose the other property values you want, and then click OK.
  3. Glue the endpoints on the association ends to connection points [image] on the classes you want to relate.

Click to show or hide information. Indicate an association between two classes

  1. Drag a Binary Association or Association Class shape from the UML Static Structure stencil onto the drawing page near the classes you want to relate.
  2. Glue the endpoints on the association shape to connection points [image] on the class shapes.
  3. Double-click the Association shape to open its UML Properties dialog box, and then type or choose the property values you want.
  4. Click OK.

Click to show or hide information. Indicate an association that has class properties

  1. In a static structure diagram, drag an Association Class or N-ary Association Class shape onto the drawing page.
  2. Glue the endpoints on the association ends to connection points [image] on two or more class shapes.
  3. Double-click the Association Class shape, and in the UML Association Class Properties dialog box type a name for the association class.
  4. Click Association Ends, and select the end to which you want to add adornments, and then click Properties.
  5. Click Association End, and type or choose the end name, multiplicity, navigability, aggregation and other options you want, and then click OK.
  6. Repeat steps 4 and 5 until you've added adornments to all the ends, and then click OK.

Click to show or hide information. Set the number of ends on an n-ary association or association class

  1. In a static structure diagram, double-click the N-ary Association or N-ary Association Class shape with ends you want to set.
  2. Click Association Class, and under End Count, choose the number of ends you want, and then click OK.


Work with dependencies (UML static structure diagrams)

Click to show or hide information. Bind template parameters to classes

  1. Drag a Bound Element shape from the UML Static Structure stencil onto the drawing page near the Parameterized Class shape with parameters you want to bind.
  2. Drag a Binding shape onto the drawing page and glue the endpoint without an arrowhead to a connection point [image] on the bound element.
  3. Glue the Binding endpoint with an arrowhead to a connection point on the Parameterized Class shape.
  4. Double-click the Binding shape, and then click Bound Arguments.
  5. Under Bound Arguments, select a parameter to which you want to bind a type (if the parameter has no type specified) or select a value (if the parameter has a type specified). Click Properties, choose the type or type the value you want, and then click OK.
  6. Click OK to close the UML Binding Properties dialog box.

Attributes and operations associated with the parameterized class are passed to the bound element. Unbound parameters (with no specified type) that you have assigned to the class as attribute types or operation return types, are replaced in the bound element by the types you specified in step 5 above.

Click to show or hide information. Indicate a dependency relationship between UML elements

  1. Drag a Dependency shape from the UML Static Structure, UML Deployment, or UML Component stencil onto the drawing page and place it near the elements you want to relate.
  2. Glue the endpoint with an arrowhead to a connection point [image] on the element the other element depends on. Glue the endpoint without an arrowhead to a connection point on the element that depends on the other element.
  3. Double-click the dependency to add a name, stereotype, and other properties.

Click to show or hide information. Tip

If you want to indicate a trace, refinement, usage, or binding dependency, you can use the Trace, Refinement, Usage, or Binding shapes from the UML Static Structure stencil.

Click to show or hide information. Indicate that classes in a package may be referenced

  1. In a package diagram, drag a Dependency shape onto the drawing page.
  2. Glue the Dependency endpoint without an arrowhead to a connection point on the package that will reference the classes in another package.
  3. Glue the Dependency endpoint with an arrowhead to a connection point [image] on the package that contains the target classes that will be referenced.
  4. Double-click the Dependency shape to open the UML Dependency Properties dialog box.
  5. Under Name, type a name for the dependency. Under Stereotype, choose Import, and then click OK.

Note Connecting packages with an <<import>> dependency only indicates that classes can be referenced. You still need to set the appropriate visibility for the target classes.


Work with generalizations (UML static structure diagrams)

Click to show or hide information. Add a discriminator label to a generalization

  1. In a static structure diagram, double-click the Generalization shape you want to add a discriminator to.
  2. In the UML Generalization Properties dialog box, for Discriminator, type the name of the discriminator you want, and then click OK.

Click to show or hide information. Indicate a generalization relationship between UML elements

  1. Drag a Generalization shape from the UML Static Structure stencil onto the drawing page near the classes or packages you want to relate.
  2. Glue the endpoint near the arrowhead to a connection point [image] on the more general element. Glue the endpoint without the arrowhead to a connection point on the more specific element.
  3. Double-click the Generalization shape. In the UML Generalization Properties dialog box, add a name, stereotype, discriminator, and other property values, and then click OK.

Click to show or hide information. Tip

To indicate a generalization for an association, use the Association Class shape rather than the Binary Association shape.


Work with links (UML static structure diagrams)

Click to show or hide information. Indicate a link between three or more objects

  1. Drag an N-ary Link shape from the UML Static Structure stencil onto the drawing page near the objects you want to relate.
  2. Double-click the N-ary Link shape to open its UML Properties dialog box. Under LinkEnd Count, set the number of link ends you want. Type or choose the other property values you want, and then click OK.
  3. Glue the endpoints on the link ends to connection points [image] on the objects you want to relate.

Click to show or hide information. Indicate a link between two objects

  1. Drag a Link shape from the UML Static Structure stencil onto the drawing page near the objects you want to relate.
  2. Glue the endpoints on the link to connection points [image] on the objects.
  3. Double-click the Link shape to open the UML Link Properties dialog box, and then type or choose the property values you want.
  4. Click OK.


Work with packages (UML model)

Packages are the key organizing elements for UML models. You can use packages as containers for elements, views (diagrams), and other packages. Packages provide a way for you to divide large diagrams and models into manageable subsets. You can think of the entire system as a single high-level package with all the models and elements in it.

When you create a new model, the UML Model Diagram solution automatically creates a top package for the model. This package serves as the container for all the elements, packages, and diagrams you create as part of the model.

Click to show or hide information. Create a new package from the Model Explorer

In the tree view, right-click the package you want to create the new package in, click New, and then click Package.

A new package icon is automatically added to the tree view and the UML Package Properties dialog box opens.

Click to show or hide information. Create a new package from a diagram

  1. In the tree view, double-click the icon for the diagram you want to add the package to.

The drawing page for the diagram appears.

  2. From the UML Static Structure, UML Use Case, UML Component, or UML Deployment stencil, drag a package shape onto the drawing page.

An icon representing the package is added to the tree view.

Click to show or hide information. Create a new diagram from a package

To automatically create a new diagram each time you add a new package to your model, on the UML menu click Options, and then, on the UML Add-In tab, select Create a diagram page when a package or subsystem shape is added to a document.

To create a new diagram if this option is not selected, right-click the new Package shape and click Diagrams, and then click New. Type a name for the diagram and select a diagram type, and then click OK.

Click to show or hide information. Add elements to a package

In the tree view, right-click the package you want to add elements to, click New, and then choose the type of element you want to add.

An icon for the element is added to the tree view.

Click to show or hide information. Represent package contents in a diagram

  1. In the tree view, right-click the icon for the package with contents you want to represent, and then choose the type of diagram you want to include in the package.

The appropriate stencil and a blank drawing page appear. A watermark with the name of the diagram type appears on the workspace.

  2. Drag shapes representing the elements you want to include in the package onto the drawing page.


Class shape (UML static structure diagram)

In a static structure diagram, a class UML Class shape icon -- three stacked rectangles, smaller on top describes a set of objects with similar structure, behavior, and relationships. Classes are declared in class (static structure) diagrams and represent concepts in the systems being modeled. The name of a class must be unique within its package.

Click to show or hide information. Learn why a Class shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Class shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Hide the attributes or operations sections of a Class shape

Right-click the shape, click Shape Display Options, and then, under Suppress, check Attributes or Operations.

Click to show or hide information. Control which property values are displayed on the Class shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Hide template parameters

Right-click the shape, click Shape Display Options, and then, under Suppress, check Template Parameters.

Click to show or hide information. Indicate a realizes relationship

Right-click the Class shape, click Shape Display Options, and then select Realization Link. Select the shape, and then drag the control handle [image] to create a Realizes arrow.

Click to show or hide information. Create a diagram owned by the Class shape

Right-click the shape, click Diagrams, click New, choose the type of diagram you want, and then click OK.

Or, right-click the shape in the Model Explorer and click New Diagram.

Click to show or hide information. Navigate to other views of the Class shape

Right-click the shape, click Views, select the view you want, and then click OK.

Click to show or hide information. Show, in a view, the relationships between the class and other elements

Right-click the shape, and then click Show Relationships.


Binary Association shape (UML static structure diagram)

In a static structure diagram, a binary association Binary Association shape icon -- connection double-headed arrow is a relationship between exactly two classes. You can add name and stereotype properties to a binary association. The point where a binary association connects to a class is called an association end or role. Properties related to a specific role, such as end name, multiplicity, aggregation, and navigability are attached to an association end.

Click to show or hide information. Learn why a Binary Association shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Binary Association shape and add adornments to its ends

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Binary Association shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the binary association

Right-click the shape, click Views, select the view you want, and then click OK.


Generalization shape (UML static structure diagram)

In a static structure diagram, a generalization [image] is a relationship between a specific element and a general element, such that the specific element is fully consistent with the general element and includes additional information (such as attributes and associations). For example, the classes Polygon, Ellipse, and Spline can all be specific elements of a more general abstract class element named Shape.

To indicate a generalization, use a solid line with a hollow arrow at the end pointing toward the more general element. You can add a discriminator text label to a generalization path.

Generalization is most often used with classes, use cases, and packages, but can also be used with other UML elements.

Click to show or hide information. Learn why a Generalization shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Generalization shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Generalization shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the Generalization shape

Right-click the shape, click Views, select the view you want, and then click OK.


N-ary Association shape (UML static structure diagram)

In a static structure diagram, an N-ary association [image] is an association among three or more classes (a single class can appear more than once). Each instance of the association is an ordered set of values from the respective classes. No association end in an n-ary association can contain the aggregation marker. An n-ary association can be an association class with attributes, operations, and other properties.

Click to show or hide information. Learn why an N-ary Association shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an N-ary Association shape and add adornments to its ends

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Choose the number of n-ary association ends

Double-click the N-ary Association shape, and then, for End Count, choose the number of ends you want.

Click to show or hide information. Control which property values are displayed on the N-ary Association shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the n-ary association

Right-click the shape, click Views, select the view you want, and then click OK.


N-ary Association Class shape (UML static structure diagram)

Use an N-ary association class [image] in a static structure diagram to add attributes, operations, and other properties to an association. Drawn as a class attached by a dashed line to an association, an association class is actually a single modeling element. The element has a single name that can appear on the association, in the class, or in both places. The association ends can have the usual adornments.

Click to show or hide information. Learn why an N-ary Association Class shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an N-ary Association Class shape and add adornments to its ends

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Choose the number of n-ary association class ends

Double-click the N-ary Association Class shape, and then, under End Count, choose the number of ends you want.

Click to show or hide information. Reposition the class in relation to the association

Drag the control handle [image] in the center of the class.

Click to show or hide information. Hide the attributes or operations sections of an association class

Right-click the shape, click Shape Display Options, and then, under Suppress, check Attributes or Operations.

Click to show or hide information. Control which property values display on the N-ary Association Class shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Create a diagram owned by the association class

Right-click the shape, click Diagrams, click New, choose the type of diagram you want, and then click OK.

Click to show or hide information. Navigate to other views of the association class

Right-click the shape, click Views, select the view you want, and then click OK.


Association Class shape (UML static structure diagram)

Use an association class Association Class shape icon - double arrow on top of yellow box in a static structure diagram to add attributes, operations, and other properties to an association. Drawn as a class attached by a dashed line to an association, an association class is actually a single modeling element. The element has a single name that can appear on the association, in the class, or in both places. The association ends can have the usual adornments.

Click to show or hide information. Learn why an Association Class shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an Association Class shape and add adornments to its ends

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Hide the attributes or operations sections of an association class

Right-click the shape, click Shape Display Options, and then, under Suppress, check Attributes or Operations.

Click to show or hide information. Control which property values are displayed on the Association Class shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Create a diagram owned by the association class

Right-click the shape, click Diagrams, click New, choose the type of diagram you want, and then click OK.

Click to show or hide information. Navigate to other views of the association

Right-click the shape, click Views, select the view you want, and then click OK.


Link shape (UML model)

A link [image] is an instance of an association and represents references between objects. It can be binary, in which case it is a path between two objects, or reflexive, in which case it involves a loop with each end attached to the same object. If the association name is shown, it is underlined to indicate an instance.

End names, aggregation, composition, navigability, and other adornments can be shown on the link ends or roles but, because links are instances, their ends do not show multiplicity. A link can also have a stereotype to indicate a particular kind of implementation.

Click to show or hide information. Learn why a Link shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Link shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Link shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.


N-ary Link shape (UML model)

An n-ary link [image] is an instance of an association and represents references between objects. An n-ary link is a path between n objects. If the association name is shown, it is underlined to indicate an instance.

End names, aggregation, composition, navigability, and other adornments can be shown on the link ends or roles but, because links are instances, their ends do not show multiplicity. A link can also have a stereotype to indicate a particular kind of implementation.

Click to show or hide information. Learn why an N-ary Link shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an N-ary Link shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the N-ary Link shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Choose the number of n-ary link ends

  • Double-click the N-ary Link shape, and then, for LinkEnd Count, choose the number of ends you want.


Dependency shape (UML static structure diagram)

A dependency is a relationship between two elements that indicates that changes to the source element can cause changes in the target element.

The notation for a dependency [image] is a dashed arrow, and the element at the tail of the arrow depends on the element at the arrowhead. A dependency relates the model elements themselves and doesn't require instances for its meaning. Four kinds of dependency have been predefined and are labeled with an optional stereotype: trace, refinement, usage, and binding.

Click to show or hide information. Learn why a Dependency shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Dependency shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Dependency shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the dependency

Right-click the shape, click Views, select the view you want, and then click OK.


Composition shape (UML static structure diagram)

A composition Composition shape icon from UML stencils -- connection line diamond at one end, arrow at the other is a form of aggregation that indicates that a part may belong to only one whole and that the lifetime of the whole determines the lifetime of the part.

A composition is indicated with a solid filled diamond adornment on one of the association ends, and can be thought of as a collaboration in which all of the participants are part of a single composite object.

Click to show or hide information. Learn why a Composition shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Composition shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Composition shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the composition

Right-click the shape, click Views, select the view you want, and then click OK.


Data Type shape (UML static structure diagram)

A data type [image] is an instance of the DataType metaclass defined in the UML metamodel. A data type declares a type of class attribute. That type is available as a string you can include when you define attributes for other elements in a model.

For example, you can use a data type to declare a Money type. Then, you can add price : Money as an attribute to a class called Order. The Microsoft Visio UML Model Diagram solution includes the common data types for C++, VB, IDL, and C#, and you can add data types of your own.

Click to show or hide information. Learn why a Data Type shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Data Type shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Hide the operations section of a Data Type shape

  • Right-click the shape, click Shape Display Options, and then, under Suppress, select Operations.

Click to show or hide information. Control which property values are displayed on the Data Type shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the data type

Right-click the shape, click Views, select the view you want, and then click OK.

Click to show or hide information. Show, in a view, the relationships between the data type and other elements

Right-click the shape, and then click Show Relationships.


Interface shape (UML static structure diagram)

An interface [image] [image] specifies the externally visible operations of a class, component, package, or other element without specifying internal structure.

An interface has operations but no attributes, states, or associations. In terms of notation, an interface can be represented in two ways:

  • As a class shape with the stereotype <<interface>>, attached to the element that supports it by a realizes relationship.
  • By a circle, attached to the element that supports it with a solid line.

A realizes relationship is a relationship that means the client at the tail of the arrow supports or inherits all the operations of the supplier at the arrowhead.

Use realizes relationships between a class (as the supplier) and its interface (when the interface is represented by a Class shape with the stereotype <<interface>>), or between an implementation class (as the supplier) and a type.

Click to show or hide information. Learn why an Interface shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Change which shape displays for an interface

Right click the Interface shape, click Shape Display Options, and click Show as Class-like Interface or Show as Lollipop Interface.

Click to show or hide information. Name an Interface shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Interface shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the interface

Right-click the shape, click Views, select the view you want, and then click OK.

Click to show or hide information. Show, in a view, the relationships between the interface and other elements

Right-click the Interface shape, and then click Show Relationships.

Click to show or hide information. Change the size of the circle at the end of the linear Interface shape

Select the shape, and then drag the control handle [image].


Utility shape (UML static structure diagram)

In a static structure diagram, a utility UML Utility shape icon -- three stacked rectangles form square is a programming convenience rather than a fundamental construct. Attributes and operations you define for a utility become global variables and procedures. The notation for a utility is a class with the stereotype <<utility>>.

Click to show or hide information. Learn why a Utility shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Utility shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Hide the attributes or operations sections of a Utility shape

Right-click the shape, click Shape Display Options, and then, under Suppress, check Attributes or Operations.

Click to show or hide information. Control which property values are displayed on the Utility shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the utility

Right-click the shape, click Views, select the view you want, and then click OK.

Click to show or hide information. Create a diagram owned by the Utility shape

Right-click the shape, click Diagrams, click New, choose the type of diagram you want, and then click OK.

Click to show or hide information. Show, in a view, the relationships between the utility and other elements

Right-click the shape, and then click Show Relationships.


Subsystem shape (UML model)

A subsystem [image] is a package that contains the contents of the entire system or an entire model within the system. Dragging a Subsystem shape onto a drawing page automatically creates a new static structure diagram on a new drawing page. You can place elements that belong to the subsystem package onto the page to create a view.

Click to show or hide information. Learn why a Subsystem shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Subsystem shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values display on the Subsystem shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Create a diagram within a Subsystem shape

Right-click the shape, click Diagrams, click New, choose the type of diagram you want, and then click OK.

Click to show or hide information. View diagrams contained in a Subsystem shape

Right-click the shape and click Diagrams.

Click to show or hide information. Navigate to other views of the Subsystem shape

Right-click the shape, click Views, select the view you want, and then click OK.

Click to show or hide information. Show, in a view, the relationships between the subsystem and other elements

Right-click the shape, and then click Show Relationships.


Parameterized Class shape (UML static structure diagram)

In a static structure diagram, a parameterized class UML Parameterized class shape -- like class shape with small box outlined top right is a template that describes a class with one or more unbound formal parameters. It defines a family of classes, each of which is specified by binding the parameters to actual values. The formal parameters are listed in a dashed rectangle in the upper right corner of the Parameterized Class shape and the parameters have the syntax name : type, where name is an identifier and type is a string. You can create a one-way association from a parameterized class to another class.

Click to show or hide information. Learn why a Parameterized Class shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Parameterized Class shape and add parameters and other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Hide the attributes or operations sections of a Parameterized Class shape

Right-click the shape, click Shape Display Options, and then, under Suppress, check Attributes or Operations.

Click to show or hide information. Control which property values are displayed on the Parameterized Class shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Hide template parameters

Right-click the shape, click Shape Display Options, and then, under Suppress, check Template Parameters.

Click to show or hide information. Indicate a realizes relationship

  • Right-click the Parameterized Class shape, click Shape Display Options, and then select Realization Link. Select the shape, and then drag the control handle [image] to create a Realizes arrow.

Click to show or hide information. Create a diagram owned by the Parameterized Class shape

Right-click the shape, click Diagrams, click New, choose the type of diagram you want, and then click OK.

Click to show or hide information. Navigate to other views of the parameterized class

Right-click the shape, click Views, select the view you want, and then click OK.

Click to show or hide information. Show, in a view, the relationships between the parameterized class and other elements

Right-click the shape, and then click Show Relationships.


Bound Element shape (UML static structure diagram)

In a static structure diagram, a bound element Bound Element shape icon from the UML Static Structure stencil is a use of a parameterized class, or template, in which the parameters from the parameterized class are bound to actual values. Because a bound element is fully specified by the parameterized class, you can't declare new attributes or operations. You can indicate the relationship between a bound element and its parameterized class by the way you name the bound element or by using a binding dependency to connect the bound element with the parameterized class.

Click to show or hide information. Learn why a Bound Element shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Bound Element shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Display the attributes or operations sections of a Bound Element shape

Right-click the shape, click Shape Display Options, and then, under Suppress, clear Attributes or Operations.

Click to show or hide information. Control which property values are displayed on the Bound Element shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Create a diagram owned by the Bound Element shape

Right-click the shape, click Diagrams, click New, choose the type of diagram you want, and then click OK.

Click to show or hide information. Show, in a view, the relationships between the bound element and other elements

Right-click the shape, and then click Show Relationships.


Metaclass shape (UML static structure diagram)

In a static structure diagram, a metaclass [image] is a class whose instances are classes. It is shown in UML notation as a class with the stereotype <<metaclass>>.

Click to show or hide information. Learn why a Metaclass shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Metaclass shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Hide the attributes or operations sections of a Metaclass shape

Right-click the shape, click Shape Display Options, and then, under Suppress, check Attributes or Operations.

Click to show or hide information. Control which property values are displayed on the Metaclass shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the metaclass

Right-click the shape, click Views, select the view you want, and then click OK.

Click to show or hide information. Create a diagram owned by the Metaclass shape

Right-click the shape, click Diagrams, click New, choose the type of diagram you want, and then click OK.

Click to show or hide information. Show, in a view, the relationships between the metaclass and other elements

Right-click the shape, and then click Show Relationships.


Object shape (UML static structure diagram)

In a static structure diagram, an object [image] represents a particular instance of a class. An object has a name, which is underlined to indicate an instance-level element, and attributes. Objects usually appear in conceptual models where they represent real-world concepts and do not specify behavior, or in object diagrams, which show a snapshot of a system at a point in time. In class diagrams, objects are used mainly to show examples of data structures.

Click to show or hide information. Learn why an Object shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an Object shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Hide the attributes section of an Object shape

Right-click the shape, click Shape Display Options, and then, under Suppress, select Attributes.

Click to show or hide information. Control which property values are displayed on the Object shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.


Signal shape (UML model)

A signal [image] is a generalizable element defined independently of the classes handling the signal. It specifies an asynchronous stimulus communicated between instances to which there is no reply. The receiving instance handles the signal by a state machine. A signal can be attached to a classifier, which means that instances of the classifier can receive the signal.

Click to show or hide information. Learn why a Signal shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Signal shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Signal shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Hide the parameters on a Signal shape

Right-click the shape, click Shape Display Options, and then, under Suppress, select Parameter.

Click to show or hide information. Navigate to other views of the signal

Right-click the shape, click Views, select the view you want, and then click OK.

Click to show or hide information. Show, in a view, the relationships between the signal and other elements

Right-click the shape, and then click Show Relationships.


Exception shape (UML model)

An exception [image] is a signal raised by behavioral features typically in case of execution faults. In the metamodel, Exception is derived from Signal.

Click to show or hide information. Learn why an Exception shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an Exception shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Exception shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Hide the parameters on an Exception shape

Right-click the shape, click Shape Display Options, and then, under Suppress, select Parameter.

Click to show or hide information. Navigate to other views of the exception

Right-click the shape, click Views, select the view you want, and then click OK.

Click to show or hide information. Show, in a view, the relationships between the signal and other elements

Right-click the shape, and then click Show Relationships.


Trace shape (UML model)

Trace [image] is a kind of dependency that indicates a historical relationship between two elements that represent the same concept at different semantic levels or from different points of view. The related elements abstract the same part of the system but in different models. The notation for a trace dependency is a dashed arrow labeled with the stereotype <<traces>>.

Click to show or hide information. Learn why a Trace shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Trace shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Trace shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the trace

Right-click the shape, click Views, select the view you want, and then click OK.


Refinement shape (UML model)

Refinement [image] is a kind of dependency that indicates a historical or derivation relationship between two elements with a mapping between them. A description of the mapping can be attached to the dependency in a note. The notation for a refinement dependency is a dashed arrow labeled with the stereotype <<refines>>.

Click to show or hide information. Learn why a Refinement shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Refinement shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Refinement shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the refinement relationship

Right-click the shape, click Views, select the view you want, and then click OK.


Usage shape (UML model)

Usage [image] is a kind of dependency that indicates that one element requires the presence of another element for its correct implementation or functioning. The notation for a usage dependency is a dashed arrow labeled with the stereotype <<uses>>. A usage can be stereotyped further to indicate the exact nature of the dependency, such as calling an operation, granting permission for access, and so on.

Click to show or hide information. Learn why a usage relationship has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a usage relationship and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the usage relationship

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the usage relationship

Right-click the shape, click Views, select the view you want, and then click OK.


Binding shape (UML model)

Binding [image] is a kind of dependency that indicates a binding of parameterized class, or template, parameters to actual values to create a bound, or nonparameterized, element. The notation for a binding dependency is a dashed arrow labeled with the stereotype <<bind>>.

Click to show or hide information. Learn why a binding relationship has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a binding relationship and add other parameter and property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the binding relationship

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of the binding relationship

Right-click the shape, click Views, select the view you want, and then click OK.


Group model elements into a subsystem (UML model)

  1. In the tree view, double-click the static structure diagram icon that represents the contents of the package you want to add a subsystem to.

A blank page appears, and the UML Static Structure stencil becomes the top-most stencil. The workspace displays 'Static Structure' as a watermark. An icon representing the diagram is added to the tree view.

Note If the tree view is not visible, click UML, point to View, and then click Model Explorer.

  2. Drag a Subsystem shape onto the drawing page.

A subsystem icon is added to the tree view, along with a static structure diagram icon that represents the subsystem's contents.

  3. Double-click the Subsystem shape to open the UML Subsystem Properties dialog box. Type or choose the property values you want, and then click OK.
  4. In the tree view, double-click the static structure diagram icon that represents the subsystem's contents.
  5. Drag shapes or icons that represent the elements the subsystem contains onto the drawing page.


Add events to a UML model

  1. In the tree view, double-click the icon that represents the package you want to add events to.

Note If the tree view isn't visible, point to View on the UML menu, and then click Model Explorer.

  2. In the UML Package Properties dialog box, click Events.
  3. Click New, choose the type of event you want to add, and then click OK.

The appropriate event properties dialog box opens.

  4. Type or choose the event properties you want, and then click OK.
  5. Repeat steps 3 and 4 until you've added all the events you want, and then click OK to close the UML Properties dialog box for the package.

The events you add to a package are available to other appropriate elements, such as action states, contained in the package.

Click to show or hide information. Tip

You can also create new events by clicking Events on the UML menu. Select the package in which you want the event to be created, and click New.


Use Case shape (UML use case diagram)

In a use case diagram, a use case [image] represents a set of events that occurs when an actor uses a system to complete a process. Normally, a use case is a relatively large process, not an individual step or transaction.

Click to show or hide information. Learn why a Use Case shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a Use Case shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Hide the name or stereotype of a Use Case shape

Right-click the shape, click Shape Display Options, and then clear Name or Stereotype.

Click to show or hide information. Add extension points to a Use Case shape

  1. In a use case diagram, drag a Use Case shape onto the drawing page.
  2. Double-click the Use Case shape, and then click the Extension Points category.
  3. Click New, type the extension point name you want, and then click OK.
  4. Repeat step 3 for each extension point you want to add, and then click OK.

Click to show or hide information. Tip

To hide the extension points compartment of the Use Case shape, right-click the shape, click Shape Display Options, and then clear Extension point. To apply this change only to the selected shape, clear the option Apply to all similar UML shapes on the current page in the Shape Display Options dialog box.

Click to show or hide information. Show documentation and other tagged values associated with a use case

Right-click the Use Case shape, click Shape Display Options, and then select Properties.

Click to show or hide information. Navigate to other views of the use case

Right-click the shape, click Views, select the view you want, and then click OK.


Actor shape (UML use case diagram)

In a use case diagram, an actor [image] represents a role played by an outside object. One physical object, therefore, can be represented by several actors. A communicates relationship indicates how an actor participates in a use case.

Click to show or hide information. Learn why an Actor shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an Actor shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Hide the name or stereotype of an Actor shape

Right-click the shape, click Shape Display Options, and then clear Name or Stereotype.

Click to show or hide information. Show documentation and other tagged values associated with an Actor shape

Right-click the shape, click Shape Display Options, and then select Properties.

Click to show or hide information. Navigate to other views of the actor

Right-click the shape, click Views, select the view you want, and then click OK.


Communicates shape (UML use case diagram)

In a use case diagram, the communicates relationship [image] defines how an actor participates in a use case. You can add an arrow to the relationship to indicate the direction the information flows.

Click to show or hide information. Learn why a Communicates shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a communicates relationship and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the Communicates shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Show end names and other values associated with the end of a communicates relationship

Right-click the Communicates shape, click Shape Display Options, and then select an End option.

Click to show or hide information. Navigate to other views of a communicates relationship

Right-click the shape, click Views, select the view you want, and then click OK.


Extends shape (UML use case diagram)

In a use case diagram, the extends relationship [image] between two use cases indicates that an instance of use case B, subject to conditions specified in the extension, can include the behavior specified by use case A. The arrowhead in the Extends relationship shape points toward the base use case, not toward the extension.

Click to show or hide information. Learn why an Extends shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name an extends relationship and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the extends relationship

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of an extends relationship

Right-click the shape, click Views, select the view you want, and then click OK.


Uses shape (UML use case diagram)

In a use case diagram, the uses relationship [image] between two use cases indicates that an instance of use case A will also include behavior as specified by use case B. The arrowhead in the Uses relationship shape points toward the use case being used.

Click to show or hide information. Learn why a Uses shape has red error marking

Right-click the shape, and then click Display Semantic Errors. Read the error message selected in the Errors tab of the Output window.

Click to show or hide information. Name a uses relationship and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view, or the shape that represents the element in a diagram.

Click to show or hide information. Tip

Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Click to show or hide information. Control which property values are displayed on the uses relationship

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Click to show or hide information. Navigate to other views of a uses relationship

Right-click the shape, click Views, select the view you want, and then click OK.


System Boundary shape (UML use case diagram)

In a use case diagram, the system boundary [image] is a boundary surrounding the use cases which indicates the system.

Click to show or hide information. Resize a System Boundary shape

Select the shape, and then drag a selection handle.

Click to show or hide information. Rename a System Boundary shape

Select the shape, and then type the name you want.

Click to show or hide information. Move a system boundary and the use cases it contains

Drag a selection rectangle around the System Boundary shape to select it and all the Use Cases, and then drag the shapes to a new location.


Indicate a relationship between an actor and a use case

  1. In a use case diagram, drag a Communicates shape onto the drawing page.
  2. Glue one endpoint [image] of the Communicates shape to a connection point [image] on an Actor shape. Glue the other endpoint to a connection point on a Use Case shape.
  3. If you want to add an arrow to indicate the flow of information, do the following:
  • Double-click the Communicates shape, then, under Association, click the end you want to edit, and then click Properties.
  • In the Association End category, check IsNavigable, click OK, then click OK again.
  • Right-click the Communicates shape and click Shape Display Options. Under End options, select End navigability, and then click OK.


Indicate a uses relationship between two use cases

  1. In a use case diagram, drag a Uses relationship shape onto the drawing page.
  2. Glue the Uses endpoint (without an arrowhead) to a connection point [image] on the Use Case shape that uses the behavior of the other use case.
  3. Glue the Uses endpoint (with an arrowhead) to a connection point on the use case being used.
  4. Double-click the Uses shape to open the UML Generalization Properties dialog box. Add property values, and then click OK.


Indicate an extends relationship between two use cases

  1. In a use case diagram, drag an Extends shape onto the drawing page.
  2. Glue the Extends endpoint [image] without an arrowhead to a connection point [image] on the use case providing the extension.
  3. Glue the Extends endpoint with an arrowhead to a connection point on the base use case.
  4. Double-click the Extends shape to open the UML Generalization Properties dialog box. Add the property values, and then click OK.


Indicate a system boundary in a use case diagram

  1. In a use case diagram, drag a System Boundary shape onto the drawing page.
  2. Double-click the shape, and then type a new name for the system or press the DELETE key to delete the existing name. Click outside the shape on the drawing page.
  3. To resize the system boundary, select the shape, and then drag a selection handle.

  4. Drag Use Case shapes from the Use Case stencil and place them inside the system boundary, and then drag Actor shapes to the outside of the system boundary.
  5. Use Communicates shapes to indicate relationships between actors and use cases, and Extends and Uses shapes to indicate relationships between use cases.